1##----scroll_detalle_nm----
2#set($sort = "createdate")
3#set($criteria= "desc")
4#set($art_next = $articleToolbox.getSiblingArticle($sort, $criteria, "next"))
5#set($criteriab= "asc")
6#set($art_prev = $articleToolbox.getSiblingArticle($sort, $criteriab, "prev"))
7#set($sectionID = "#printAssignedSectionID_v1")
8#set($sectionName = "#printAssignedSection_v1")
9#set($templateId = $iterVelocityTools.getVelocityVariable("template_id"))
10#set($varColorIter = $!iterVelocityTools.getVariable("0" , "color"))
11#set($canonicalUrl = $!articleToolbox.getArticleViewer("canonical"))
12#set ($info = $!iterVelocityTools.getVariable("0" , "printInfo"))
13#set($date = $!iterVelocityTools.getVariable("0" , "date"))
14#set($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))
15#set($dateFormatFactory = $portalBeanLocator.locate('com.liferay.portal.kernel.util.DateFormatFactoryUtil'))
16#set($indexFormat = $dateFormatFactory.getSimpleDateFormat('EEE, dd MMM yyyy HH:mm:ss'))
17#set($idCreateData = $indexFormat.parse($reserved-article-create-date.getData()))
18#set($idModData = $indexFormat.parse($reserved-article-modified-date.getData()))
19#set($hasImages = $articleToolbox.getNumImageTags("Image", "true"))
20#if($hasImages <= 0)
21 #set($templateClass = "no-media")
22#end
23#set ($xml =$articleContext.selectNodes('//section'))
24#set($nivel = 1)
25#set($pagname = "")
26#set($secc1 = "")
27#set($secc2 = "")
28#set($secc3 = "")
29#set($secc4 = "")
30#set($secc5 = "")
31#foreach ($nodexml in $xml )
32 #if($nivel < 4)
33 #set($secc = $htmlUtil.escape($!nodexml.attribute('name').getValue()))
34 #set($secc_url = $htmlUtil.escape($!nodexml.attribute('url').getValue()))
35 #if($nivel == 1)
36 #set($secc1 = $secc)
37 #set($secc1_url = $secc_url)
38 #elseif($nivel == 2)
39 #set($secc2 = $secc)
40 #set($secc2_url = $secc_url)
41 #elseif($nivel == 3)
42 #set($secc3 = $secc)
43 #set($secc3_url = $secc_url)
44 #elseif($nivel == 2)
45 #set($secc4 = $secc)
46 #set($secc4_url = $secc_url)
47 #elseif($nivel == 5)
48 #set($secc5 = $secc)
49 #set($secc5_url = $secc_url)
50 #end
51 #set($nivel = $nivel + 1)
52
53 #end
54#end
55## METADATOS ***********************************************
56#set($auxCatalagoTema = {})
57#getAcAssignedCatExtended_v1($auxCatalagoTema 'Topics')
58#set($auxCatalagoMarcas = {})
59#getAcAssignedCatExtended_v1($auxCatalagoMarcas 'car_brands')
60
61##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
62##++++++++++++++++++++++++++++++++++ DATALAYER JSON METAS +++++++++++++++++++++++++++++++++++++++++
63
64## ***************AUTOR ********************
65#set($autorName = "")
66#set($autorfinal = "")
67#set($autorUrl = "")
68#set($hmAutores = {})
69#getAcAssignedCatExtended_v1($hmAutores "Author")
70#if($hmAutores.size() > 0)
71 #foreach ($hmAutor in $hmAutores)
72 #set($autorfinal = $hmAutor.friendlyname.replaceAll("-", " "))
73 #set($autorUrl="/autor/-/meta/" + $hmAutor.friendlyname )
74 #if($autorName != "")
75 #set($autorName = $autorName + " | <a href="" + $autorUrl + "" title="" + $hmAutor.name + "">" + $!hmAutor.name +"</a>")
76 #else
77 #set($autorName = "<a href="" + $autorUrl + "" title="" + $hmAutor.name + "">" + $!hmAutor.name +"</a>")
78 #end
79 #end
80
81 ## #set($hmAutor = $hmAutores.get(0))
82 ## #set($autorName = $hmAutor.name)
83 ## #set($autorfinal = $hmAutor.friendlyname.replaceAll("-", " "))
84 ## #set($autorUrl="/autor/-/meta/" + $hmAutor.friendlyname )
85#else
86 #set($autorName = $!articleToolbox.getTag(null, "Byline").data)
87#end
88#if($autorfinal == "")
89 #set($autorfinal = "redaccion_nm")
90#end
91#set($ac-url = $articleContext.selectNodes('articlectx/url'))
92#set($xml-url = $ac-url.get(0).text)
93#set($url_actual = $!xml-url )
94
95##*************** TEMAS ***************************
96#set($keywordsfinal="")
97#set($keywordsfinal_datalayer="")
98#if($auxCatalagoTema.size() > 0)
99 #foreach($keyword in $auxCatalagoTema)
100 #if($keywordsfinal == '')
101 #set($keywordsfinal = $keyword.friendlyname)
102 #else
103 #set($keywordsfinal = $keywordsfinal + ',' + $keyword.friendlyname)
104 #end
105
106 #if($keywordsfinal_datalayer == '')
107 #set($keywordsfinal_datalayer = $keyword.friendlyname.replaceAll("-", " "))
108 #else
109 #set($keywordsfinal_datalayer = $keywordsfinal_datalayer + '|' + $keyword.friendlyname.replaceAll("-", " "))
110 #end
111 #end
112 #set($keywordsfinal=""" + $keywordsfinal + '"')
113 #set($keywordsfinal_datalayer=""" + $keywordsfinal_datalayer + '"')
114#else
115 #set($keywordsfinal="undefined")
116 #set($keywordsfinal_datalayer="""")
117#end
118## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
119#set($NoPublicidad = false)
120#getAcAssignedCatExtended_v1($hmTipoArt "tipo_articulo")
121#if($hmTipoArt.size() > 0)
122 #foreach ($hmTipo in $hmTipoArt)
123 #if($hmTipo.name == "Quitar Publicidad Videos")
124 #set($NoPublicidad = true)
125 #end
126
127 #end
128#end
129
130#set($Adsschedule = $!iterVelocityTools.getVariable('0','adschedule_video').trim())
131#set($Adsschedule = $Adsschedule.replaceAll("\[adunit-video\]","$!iterVelocityTools.getVariable('0','Ad_Unit_Video')").trim())
132#set($Adsschedule = $Adsschedule.replaceAll("\[custom_params\]","").trim())
133#set($Adsschedule = $Adsschedule.replaceAll("\[url\]","#siteUrl()$url_actual").trim())
134#set($Adsschedule = $Adsschedule.replaceAll("\[url-video\]","#siteUrl()$url_actual").trim())
135<div style="display: none;">
136$iterVelocityTools.getVariable('0','adschedule_video').trim()
137</div>
138<div class="template-infinity detail " id="$reserved-article-id.data" id-prev="$!art_prev.reserved-article-id.data" id-next="$!art_next.reserved-article-id.data" id-section="$sectionID" canonicalurl="$canonicalUrl">
139
140 <script>
141 var group_id = $request.theme-display.scope-group-id;
142 var id_art_infinity = $reserved-article-id.data;
143 #if($iterVelocityTools.getVelocityVariable("teaseritemposition") == 1)
144 var teaser_first = true;
145 var n_noticia = 1;
146 #else
147 var teaser_first = false;
148 var n_noticia = n_noticia + 1;
149 #end
150 console.log("+++ teaseritemposition: $iterVelocityTools.getVelocityVariable("teaseritemposition")");
151 console.log("+++ n_noticia: " + n_noticia);
152 </script>
153
154 <div class="metadatos">#*
155 *##set($hmAutor = {})#*
156 *##getAcAssignedCatExtended_v1($hmAutor "Author")#*
157 *##if($hmAutor && $hmAutor.size() > 0)#*
158 *##foreach ($elem in $hmProtagonistas)#*
159 *#<div class="keywords" value="$elem.name" id="$elem.id" data-voc-name="author" data-voc-id="15019110"/>#*
160 *##end#*
161 *##end#*
162 *##set($hmMarcas = {})#*
163 *##getAcAssignedCatExtended_v1($hmMarcas "car_brands")#*
164 *##if($hmMarcas && $hmMarcas.size() > 0)#*
165 *##foreach ($elem in $hmMarcas)#*
166 *#<div class="keywords" value="$elem.name" id="$elem.id" data-voc-name="companies" data-voc-id="4702784"/>#*
167 *##end#*
168 *##end#*
169 *##set($hmTemas = {})#*
170 *##getAcAssignedCatExtended_v1($hmTemas "Topics")#*
171 *##if($hmTemas && $hmTemas.size() > 0) #*
172 *##foreach ($elem in $hmTemas)#*
173 *#<div class="keywords" value="$elem.name" id="$elem.id" data-voc-name="topics" data-voc-id="15019108"/>#*
174 *##end#*
175 *##end#*
176 *#</div>
177 $!iterVelocityTools.getAdContainer("D01_cpm_m")
178 <div class="cintillo_detail e_006_080" style="display:flex;">
179 <ol class="iter-theme-news-breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
180 <li class="first last" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
181 <meta itemprop="position" content="1"/>
182 <a itemprop="item" title="$secc1" href="https://neomotor.epe.es/conduccion/$secc1_url">
183 <span itemprop="name">$secc1</span>
184 </a>
185 </li>
186 #if($secc2 != "")
187 <li class="" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
188 <meta itemprop="position" content="2"/>
189 <a itemprop="item" title="$secc2" href="https://neomotor.epe.es/conduccion/$secc2_url">
190 <span itemprop="name">$secc2</span>
191 </a>
192 </li>
193 #end
194 #if($secc3 != "")
195 <li class="" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
196 <meta itemprop="position" content="3"/>
197 <a itemprop="item" title="$secc3" href="https://neomotor.epe.es/conduccion/$secc3_url">
198 <span itemprop="name">$secc3</span>
199 </a>
200 </li>
201 #end
202 #if($secc4 != "")
203 <li class="" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
204 <meta itemprop="position" content="4"/>
205 <a itemprop="item" title="$secc4" href="https://neomotor.epe.es/conduccion/$secc4_url">
206 <span itemprop="name">$secc4</span>
207 </a>
208 </li>
209 #end
210 #if($secc5 != "")
211 <li class="" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
212 <meta itemprop="position" content="5"/>
213 <a itemprop="item" title="$secc5" href="https://neomotor.epe.es/conduccion/$secc5_url">
214 <span itemprop="name">$secc5</span>
215 </a>
216 </li>
217 #end
218 </ol>
219 </div>
220 <div id="col-12-scroll" class="col-12 container">
221 <div class="row top">
222 <div class="layout col-xs-12 col-md-12 portlet-column nopadding e_006_050">
223 <div class="text_block">
224 ##HEADTITLE TIT
225 <div class="headline">
226 <h1>$!articleToolbox.getTag(null,"Headline").data</h1>
227 </div>
228 ##INF2
229 <div class="inf2">
230 #if($!autorName != "")
231 <ul>
232 <li class="byline">
233 ##if($autorUrl == "")
234 $!autorName
235 ##else
236 ## <a href="https://neomotor.epe.es/conduccion/$autorUrl" title="$autorName">$!autorName</a>
237 ##end
238 </li>
239 </ul>
240 #end
241 </div>
242 <div class="date">
243 <span ><time>#printDate_v1($date)</time></span>
244 </div>
245
246 <div class="detail_rrss">
247 <div class="icons">
248 <div><span class="facebook-icon" title="Facebook" onClick="window.open('//facebook.com/sharer.php?u=#siteUrl()$!articleToolbox.getArticleViewer("canonical")&text=$!title.data')"></span></div>
249 <div><span class="twitter-icon" title="Twitter" onClick="window.open('//twitter.com/intent/tweet?url=#siteUrl()$!articleToolbox.getArticleViewer("canonical")&text=$!title.data')"></span> </div>
250 <div><span class="whatsapp-icon" title="Whatsapp" onClick="window.open('whatsapp://send?text=$!title.data - #siteUrl()$!articleToolbox.getArticleViewer("canonical")')"></span></div>
251 <div><span class="telegram-icon" title="Telegram" onClick="window.open('//t.me/share/url?url=#siteUrl()$!articleToolbox.getArticleViewer("canonical")&text=$!title.data')"></span> </div>
252 <div><span class="messenger-icon" title="Messenger" onClick="window.open('//fb-messenger://share/?url=#siteUrl()$!articleToolbox.getArticleViewer("canonical")&text=$!title.data')"></span></div>
253 </div>
254 </div>
255
256 $!iterVelocityTools.getAdContainer("M01_cpm_m")
257 ##SUBHEADLINE SUB
258 <div class="subheadline">
259 <h2>$!articleToolbox.getTag(null,"Subheadline").data</h2>
260 </div>
261 </div>
262
263 #if($hasImages > 0)
264 ##MULTIMEDIA IMG
265 <div class="multimedia">
266 ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
267 #set($templateType = "")
268 #set($encuadre = "crop990x557")
269 #set($widthMultimedia= "")
270 #set($heightMultimedia = "")
271 #set($cropSizes = "100%")
272
273
274 #if ($environment == 'PREVIEW')
275 #set($tempIter = " iterhtmlid='$el.Milenium.data' ")
276 #else
277 #set($tempIter = "")
278 #end
279 #if($templateType == "teaser")/
280 #set ($TeaserImage = "")
281 #getTagMacro_v1($TeaserImage, '', 'TeaserImage', -1, '', '')
282 #if($TeaserImage)
283 #set ($numImage = $TeaserImage.getSiblings().size())
284 #set($tipoContenido = "TeaserImage")
285 #else
286 #set ($Image = "")
287 #getTagMacro_v1($Image, '', 'Image', -1, '', '')
288 #set($numImage = $Image.getSiblings().size())
289 #set($tipoContenido = "Image")
290 #end
291 #else
292 #set ($numImage = $articleToolbox.getNumImageTags("Image", "true"))
293 #set($tipoContenido = "Image")
294 #end
295 #if(!$numImage)
296 #set ($numImage = 0)
297 #end
298
299 #set ($numContents = $numImage)
300
301 <div class="multimediaMacroWrapper">
302 <ul id="bxMultimedia${reserved-article-id.data}" class="bxMultimedia${reserved-article-id.data} bxSlider_content" width="$widthMultimedia" height="$heightMultimedia">
303 #set ($Multimedia = "")
304 #getTagMacro_v1($Multimedia, '', 'Multimedia', -1, '', '')
305 #if($Multimedia && $Multimedia != '')
306 #set ($numContents = $numContents + $Multimedia.getSiblings().size())
307 #foreach ($el in $Multimedia.getSiblings())
308 <li class="contentMedia art-video interno" $!tempIter>
309 <div class="responsive-video">
310 #if($el.Extension.data && $el.Extension.data == "mp3")
311 <audio controls width="$widthMultimedia" height="$heightMultimedia">
312 <source src="https://neomotor.epe.es/conduccion/$el.Document.data" type="audio/mpeg">
313 </audio>
314 #elseif ($el.Extension.data && $el.Extension.data == "mp4")
315 <div id="multimediaPlayerPrincipal${reserved-article-id.data}${velocityCount}" class="jwplayer-content_v2" preview="$el.Preview.data" data_document="https://neomotor.epe.es/conduccion/$el.Document.data" >Cargando reproductor ...</div>
316
317 <script nominify>
318 function initJwPlayer_multimediaPlayerPrincipal${reserved-article-id.data}${velocityCount}(){
319 #if($NoPublicidad)
320 jwplayer("multimediaPlayerPrincipal${reserved-article-id.data}${velocityCount}").setup({
321 "file": "https://neomotor.epe.es/conduccion/$el.Document.data",
322 "image": "$el.Preview.data",
323 "primary":" html5",
324 "fallback": true,
325 "displaytitle": false,
326 "preload": "metadata",
327 "html5player": "jwplayer.html5.js",
328 "flashplayer": "jwplayer.flash.swf",
329 "autostart": false
330 });
331 #else
332 jwplayer("multimediaPlayerPrincipal${reserved-article-id.data}${velocityCount}").setup({
333 "file": "https://neomotor.epe.es/conduccion/$el.Document.data",
334 "image": "$el.Preview.data",
335 "primary":" html5",
336 "fallback": true,
337 "displaytitle": false,
338 "preload": "metadata",
339 "html5player": "jwplayer.html5.js",
340 "flashplayer": "jwplayer.flash.swf",
341 "autostart": false,
342 "advertising": $!Adsschedule
343 });
344 #end
345 }
346 $(window).load(function() {
347 initJwPlayer_multimediaPlayerPrincipal${reserved-article-id.data}${velocityCount}();
348 });
349 </script>
350
351 #end
352
353 </div>
354 </li>
355 #end
356 #end
357 #set ($Jwplayer = "")
358 #getTagMacro_v1($Jwplayer, '', 'Jwplayer', -1, '', '')
359 #if($Jwplayer && $Jwplayer != '')
360 #set ($numContents = $numContents + $Jwplayer.getSiblings().size())
361 #foreach ($el in $Jwplayer.getSiblings())
362 <li class="contentMedia art-video externo" $!tempIter>
363 <div style="width:${widthMultimedia}px;height:${heightMultimedia}px;">
364 <div id='botr_${$el.data}_isitqcrW_div' style="width:100%;height:100%;" class="jwplayerMultimedia_content" data_document="${item.data}" widthMultimedia="${widthMultimedia}" heightMultimedia="${heightMultimedia}"></div>
365 </div>
366 </li>
367 #end
368 #end
369 #set ($Vimeo = "")
370 #getTagMacro_v1($Vimeo, '', 'Vimeo', -1, '', '')
371 #if($Vimeo && $Vimeo !='')
372 #set ($numContents = $numContents + $Vimeo.getSiblings().size())
373 #foreach ($el in $Vimeo.getSiblings())
374 <li class="contentMedia art-vimeo" $!tempIter>
375 <div class="responsive-video">
376 <iframe class="vimeo-plaayer" src="https://player.vimeo.com/video/$el.data" width="$widthMultimedia" height="$heightMultimedia" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
377 </div>
378 </li>
379 #end
380 #end
381 #set ($Youtube = "")
382 #getTagMacro_v1($Youtube, '', 'Youtube', -1, '', '')
383 #if($Youtube && $Youtube.data)
384 #set ($numContents = $numContents + $Youtube.getSiblings().size())
385 #foreach ($el in $Youtube.getSiblings())
386 <li class="contentMedia art-youtube" $!tempIter>
387 <div class="responsive-video">
388 #set ($timeParameter ="")
389 #set ($index1 = $el.data.indexOf("?t="))
390 #set ($index2 = $el.data.indexOf("?start="))
391
392 #if($index1 >= 0){
393 #set ($timeParameter = $el.data.substring($index1))
394 #set ($timeParameter = $timeParameter.replace("?t=",""))
395 #set ($el.data = $el.data.substring(0,$el.data.indexOf("?t=")))
396 #end
397 #if($index2 >= 0){
398 #set ($timeParameter = $el.data.substring($index2))
399 #set ($timeParameter = $timeParameter.replace("?start=",""))
400 #set ($el.data = $el.data.substring(0,$el.data.indexOf("?start=")))
401 #end
402 #if($timeParameter && $timeParameter != "")
403 #set ($timeParameter = "&start=" + $timeParameter)
404 #end
405
406 <iframe allowfullscreen="" frameborder="0" height="$heightMultimedia" width="$widthMultimedia" src="https://www.youtube.com/embed/$el.data?wmode=transparent&showinfo=0&theme=light$timeParameter"></iframe>
407 </div>
408 </li>
409 #end
410 #end
411
412 #if($numImage > 0)
413 #set ($numImageFor = $numImage - 1)
414 #foreach($i in [0..$numImageFor])
415 <li class="contentMedia art-gallery">
416 #if($templateType == "teaser")
417 <a href="#printAcUrl_v1()" class="cutlineShow">
418 #end
419 <figure class="cutlineShow"><picture>
420 #set($tempImage = $articleToolbox.getImageNode("$tipoContenido", "$i", "true"))
421 #set($AltImage = "#getAltImage_v1($tempImage)")
422 #set($TitleImage = "#getTitleImage_v1($tempImage)")
423 #set($tempcutline = $articleToolbox.getImageNode("$tipoContenido", "$i"))
424 #set($elcutline = $tempcutline.Cutline.data)
425 #set($elcutlinemlnid = $tempcutline.Cutline.Milenium.data)
426 #set($tempbylineimage = $articleToolbox.getImageNode("$tipoContenido", "$i"))
427 #set($elbylineimage = $tempbylineimage.Byline.data)
428 #set($elbylineimagemlnid = $tempbylineimage.Byline.Milenium.data)
429 #if($enviromentVersion == "new")
430 #set($imgHtml = $!articleToolbox.getImageTag2("$tipoContenido","$i","$encuadre","","","","true","$!AltImage","$!TitleImage","$!cropSizes"))
431 #else
432 #set($imgHtml = $!articleToolbox.getImageTag("$tipoContenido","$i","$encuadre","","","","true","$!AltImage","$!TitleImage","$!cropSizes"))
433 #end
434 #if($imgHtml)
435 $imgHtml
436 #end
437 #if($elcutline)
438 #if ($environment == 'PREVIEW')
439 #set($tempIter = " mlnid='$!elcutlinemlnid' ")
440 #set($tempIter2 = " mlnid='$!elbylineimagemlnid' ")
441 #else
442 #set($tempIter = "")
443 #set($tempIter2 = "")
444 #end
445 <span class="cutline-text" tempIter>$!elcutline</span>
446 #if($elbylineimage)
447 <span class="byline-image" tempIter2> | $!elbylineimage</span>
448 #end
449 #end
450 </picture></figure>
451 #if($templateType == "teaser")
452 </a>
453 #end
454 </li>
455 #end
456 #end
457 </ul>
458 </div>
459 ##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
460 </div> <!-- multimedia -->
461 #end
462
463
464 <div id="col-60-40" class="col-60-40 container">
465 <div class="row top">
466 <div class="layout col-60-40-top-one-col col-xs-12 col-md-8 portlet-column nopadding detalle_izq e_006_050" id="col-60-40-top-one-col">
467
468 <div class="text v_01">
469 ##**************************************************************************
470 #set ($hashNames ={})
471 #set ($temp = $hashNames.put("Text","text"))
472 #set ($temp = $hashNames.put("HTML_Text","html"))
473 #set ($temp = $hashNames.put("Lead","lead"))
474 #set ($temp = $hashNames.put("Image_Text","Image_Text"))
475 #set ($temp = $hashNames.put("Image_Text_Vertical","Image_Text_Vertical"))
476 #set ($temp = $hashNames.put("Quote","quote"))
477 #set ($temp = $hashNames.put("Youtube_Text","Youtube_Text"))
478 #set ($temp = $hashNames.put("Twitter_Text","Twitter_Text"))
479 #set ($temp = $hashNames.put("Facebook_Text","Facebook_Text"))
480 #set ($temp = $hashNames.put("Multimedia_Text","Multimedia_Text"))
481 #set ($temp = $hashNames.put("Vimeo_Text","Vimeo_Text"))
482 #set ($temp = $hashNames.put("Intext","intext"))
483 #set ($temp = $hashNames.put("Destacado","Destacado"))
484 #set ($temp = $hashNames.put("Question","Question"))
485 #set ($temp = $hashNames.put("lista","lista"))
486 #set ($temp = $hashNames.put("lista_numerica","lista_numerica"))
487 ##**************************************************************************
488 #set($cropName = "crop620xfree")
489 #set($widthMultimedia = "620")
490 #set($heightMultimedia = "400")
491 #set($cropSizes = "100%")
492 #set($contadorParrafos = 0)
493 #set($childrenTags = $articleToolbox.getChildrenTags(null))
494 #set($currentElement = 0)
495 ##**************************************************************************
496 #set($slide_imgTxt = false)
497
498 #foreach($el in $childrenTags)
499 #set ($element = {})
500 #set ($cssclass=$hashNames.get($el.name))
501 #if($cssclass)
502
503 #set ($temp = $element.put("name",$el.name))
504 #set ($temp = $element.put("cssclass",$cssclass))
505
506 #if ($environment == 'PREVIEW')
507 #set($tempIter = " iterhtmlid='$el.Milenium.data' ")
508 #else
509 #set($tempIter = "")
510 #end
511
512 #if($element.name == "Image_Text")
513 #if($el && $el.trim() != "")
514 ## vemos si hay mas image_text detras +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
515 #set($ind = $currentElement+1)
516
517 #if($childrenTags.get($ind).name == "Image_Text" && $slide_imgTxt == false)
518 #set($name_s = "bx_slider_it_" + $currentElement)
519 <div class="$name_s">
520 #set($slide_imgTxt = true)
521 #end
522 ## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
523 <figure class="contentMedia art-img ${element.cssclass}" >
524 #set($tempImage = $articleToolbox.getImageNode($el.name, $el.Milenium.data, "true"))
525 #set($AltImage = "#getAltImage_v1($tempImage)")
526 #set($TitleImage = "#getTitleImage_v1($tempImage)")
527 #if($enviromentVersion == "new")#*
528 *##set($imgHtml = $!articleToolbox.getImageTag2("$el.name","$el.Milenium.data","$cropName","","","","false","$!$AltImage","$!TitleImage","$!cropSizes"))#*
529 *##else#*
530 *##set($imgHtml = $!articleToolbox.getImageTag("$el.name","$el.Milenium.data","$cropName","","","","false","$!$AltImage","$!TitleImage","$!cropSizes"))#*
531 *##end
532 #if($imgHtml)
533 $imgHtml
534 #end
535 #if($el.Cutline && $el.Cutline.data != "")
536 #if ($environment == 'PREVIEW')
537 #set($tempIter = "mlnid='$el.Cutline.Milenium.data' ")
538 #set($tempIter2 = " mlnid='$el.Byline.Milenium.data' ")
539 #else
540 #set($tempIter = "")
541 #set($tempIter2 = "")
542 #end
543 <div class="cutline-byline">
544 <span class="cutline-text" $tempIter>$!el.Cutline.data</span>
545 #if($el.Byline && $el.Byline.data != "")
546 <span class="byline-image" $tempIter2> | $el.Byline.data </span>
547 #end
548 </div>
549 #end
550 </figure>
551 ## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
552 #if($childrenTags.get($ind).name != "Image_Text" && $slide_imgTxt)
553 </div>
554 <script>
555 $(".$name_s").bxSlider({
556 auto: false,
557 pager: false,
558 controls: true,
559 infiniteLoop: false,
560 minSlides: 1,
561 maxSlides: 1,
562 slideMargin: 20,
563 hideControlOnEnd: true
564 });
565 </script>
566 #set($slide_imgTxt = false)
567 #end
568 ## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
569
570
571
572 #end
573 #end
574
575
576 #if($element.name == "Image_Text_Vertical")
577 #if($el && $el.trim() != "")
578 ## vemos si hay mas image_text detras +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
579 #set($ind = $currentElement+1)
580
581 #if($childrenTags.get($ind).name == "Image_Text_Vertical" && $slide_imgTxt == false)
582 #set($name_s = "bx_slider_it_" + $currentElement)
583 <div class="$name_s">
584 #set($slide_imgTxt = true)
585 #end
586 ## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
587 <figure class="contentMedia art-img ${element.cssclass}" >
588 #set($tempImage = $articleToolbox.getImageNode($el.name, $el.Milenium.data, "true"))
589 #set($AltImage = "#getAltImage_v1($tempImage)")
590 #set($TitleImage = "#getTitleImage_v1($tempImage)")
591 #if($enviromentVersion == "new")#*
592 *##set($imgHtml = $!articleToolbox.getImageTag2("$el.name","$el.Milenium.data","crop_vertical","","","","false","$!$AltImage","$!TitleImage","$!cropSizes"))#*
593 *##else#*
594 *##set($imgHtml = $!articleToolbox.getImageTag("$el.name","$el.Milenium.data","crop_vertical","","","","false","$!$AltImage","$!TitleImage","$!cropSizes"))#*
595 *##end
596 #if($imgHtml)
597 $imgHtml
598 #end
599 #if($el.Cutline && $el.Cutline.data != "")
600 #if ($environment == 'PREVIEW')
601 #set($tempIter = "mlnid='$el.Cutline.Milenium.data' ")
602 #set($tempIter2 = " mlnid='$el.Byline.Milenium.data' ")
603 #else
604 #set($tempIter = "")
605 #set($tempIter2 = "")
606 #end
607 <div class="cutline-byline">
608 <span class="cutline-text" $tempIter>$!el.Cutline.data</span>
609 #if($el.Byline && $el.Byline.data != "")
610 <span class="byline-image" $tempIter2> | $el.Byline.data </span>
611 #end
612 </div>
613 #end
614 </figure>
615 ## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
616 #if($childrenTags.get($ind).name != "Image_Text_Vertical" && $slide_imgTxt)
617 </div>
618 <script>
619 $(".$name_s").bxSlider({
620 auto: false,
621 pager: false,
622 controls: true,
623 infiniteLoop: false,
624 minSlides: 1,
625 maxSlides: 1,
626 slideMargin: 20,
627 hideControlOnEnd: true
628 });
629 </script>
630 #set($slide_imgTxt = false)
631 #end
632 ## +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
633
634
635
636 #end
637 #end
638
639 #if($element.name == "Youtube_Text")
640 #if($el && $el.trim() != "")
641 <div class="multimediaMacroWrapper ${element.cssclass}">
642 <div class="contentMedia art-youtube" $!tempIter>
643 <div class="responsive-video">
644 <iframe allowfullscreen="" frameborder="0" height="$heightMultimedia" width="$widthMultimedia" src="https://www.youtube.com/embed/$el.data?wmode=transparent&showinfo=0&theme=light"></iframe>
645 </div>
646 </div>
647 </div>
648 #end
649 #end
650
651 #if($element.name == "Vimeo_Text")
652 #if($el && $el.trim() != "")
653 <div class="multimediaMacroWrapper ${element.cssclass}">
654 <div class="contentMedia art-vimeo" $!tempIter>
655 <div class="responsive-video">
656 <iframe class="vimeo-player" src="https://player.vimeo.com/video/$el.data" width="$widthMultimedia" height="$heightMultimedia" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
657 </div>
658 </div>
659 </div>
660 #end
661 #end
662
663 #if($element.name == "Twitter_Text")
664 #if($el && $el.trim() != "")
665 <div class="art-twitter ${element.cssclass}" $!tempIter>
666 <div class="twitter-content">
667 <blockquote class="twitter-tweet">
668 <a href="https://neomotor.epe.es/conduccion/$!el.data"></a>
669 </blockquote>
670 $!iterVelocityTools.includeLibrary("https://platform.twitter.com/widgets.js", "ITER.RESOURCE.CUSTOM.TwitterLoaded.resolve()")
671 </div>
672 </div>
673 #end
674 #end
675
676 #if($element.name == "Facebook_Text")
677 #if($el.data && $el.data.trim() != "")
678 <div class="${element.cssclass}">$!el.data.trim().replaceAll("&","&")</div>
679 #end
680 #end
681
682 #if($element.name == "Multimedia_Text")
683 #if($el && $el.trim() != "")
684 <div class="multimediaMacroWrapper">
685 <div class="contentMedia art-video interno ${element.cssclass}" $!tempIter>
686 <div class="responsive-video">
687
688 #if($el.Extension.data && $el.Extension.data == "mp3")
689 <audio controls width="$widthMultimedia" height="$heightMultimedia">
690 <source src="https://neomotor.epe.es/conduccion/$el.Document.data" type="audio/mpeg">
691 </audio>
692 #elseif ($el.Extension.data && $el.Extension.data == "mp4")
693 <div id="multimediaPlayer${reserved-article-id.data}${velocityCount}" class="jwplayer-content_v2" preview="$el.Preview.data" data_document="https://neomotor.epe.es/conduccion/$el.Document.data" >Cargando reproductor ...</div>
694
695 <script nominify>
696 function initJwPlayer_multimediaPlayer${reserved-article-id.data}${velocityCount}(){
697 #if($NoPublicidad)
698 jwplayer("multimediaPlayer${reserved-article-id.data}${velocityCount}").setup({
699 "file": "https://neomotor.epe.es/conduccion/$el.Document.data",
700 "image": "$el.Preview.data",
701 "primary":" html5",
702 "fallback": true,
703 "displaytitle": false,
704 "preload": "metadata",
705 "html5player": "jwplayer.html5.js",
706 "flashplayer": "jwplayer.flash.swf",
707 "autostart": false
708 });
709 #else
710 jwplayer("multimediaPlayer${reserved-article-id.data}${velocityCount}").setup({
711 "file": "https://neomotor.epe.es/conduccion/$el.Document.data",
712 "image": "$el.Preview.data",
713 "primary":" html5",
714 "fallback": true,
715 "displaytitle": false,
716 "preload": "metadata",
717 "html5player": "jwplayer.html5.js",
718 "flashplayer": "jwplayer.flash.swf",
719 "autostart": false,
720 "advertising": $!Adsschedule
721 });
722 #end
723 }
724 $(window).load(function() {
725 initJwPlayer_multimediaPlayer${reserved-article-id.data}${velocityCount}();
726 });
727 </script>
728
729 #end
730
731 </div>
732 </div>
733 </div>
734 #end
735 #end
736
737 #if($element.name == "HTML_Text")
738 #if($el.data && $el.data.trim() != "")
739 <div class="${element.cssclass}">$!el.data.trim().replaceAll("&","&")</div>
740 #end
741 #end
742 #if($element.name == "Lead")
743 #if($el && $el.trim() != "")
744 <h3 class="${element.cssclass} entradilla" mlnid="$el.Milenium.data">$!el.data.trim().replaceAll("&","&")</h3>
745 #end
746 #end
747 #if($element.name == "Ladillo")
748 #if($el && $el.trim() != "")
749 <h2 class="${element.cssclass} ladillo" mlnid="$el.Milenium.data">$!el.data.trim().replaceAll("&","&")</h2>
750 #end
751 #end
752 #if($element.name == "Text")
753 #if($el && $el.trim() != "")
754 <div class="paragraph" mlnid="$el.Milenium.data">
755 #set($tempArrayText = $el.data.trim().replaceAll("&","&").split("</p>"))
756 #foreach($parrafo in $tempArrayText)
757 #set($parrafo = $parrafo.replaceAll("<p>", "").replaceAll("</p>", "").trim())
758 #if($parrafo != "")
759 #set($contadorParrafos = $contadorParrafos + 1)
760## #if($contadorParrafos == 2)
761## $!iterVelocityTools.getAdContainer("M02_cpm_r_dcha")
762## #elseif($contadorParrafos == 5)
763## $!iterVelocityTools.getAdContainer("M04_cpm_r_dchab")
764## #elseif($contadorParrafos == 9)
765## $!iterVelocityTools.getAdContainer("M07_cpm_r_dchac")
766## #end
767
768 #if($environment == "LIVE" && $parrafo.contains("wp:paragraph") == false)
769 <p class="p_$contadorParrafos iter"><?php format_post_content('<?xml encoding="utf-8" ?>$parrafo')?></p>
770 #else
771 <p class="p_$contadorParrafos migrado">$parrafo</p>
772 #end
773
774 #end
775 #end
776 </div>
777 #end
778 #end
779
780 #if($element.name == "Intext")
781 #if($el && $el.trim() != "")
782 <div class="${element.cssclass}" $!tempIter>
783 $!el.data.trim().replaceAll("&","&")
784 </div>
785 #end
786 #end
787
788 #if($element.name == "Quote")
789 #if($el && $el.trim() != "")
790 <blockquote class="${element.cssclass}" $!tempIter>
791 <span>$!el.data.trim().replaceAll("&","&")</span>
792 </blockquote>
793 #end
794 #end
795 #if($element.name == "Destacado")
796 #if($el && $el.trim() != "")
797 <div class="${element.cssclass}" $!tempIter>
798 <span>$!el.data.trim().replaceAll("&","&")</span>
799 </div>
800 #end
801 #end
802 #if($element.name == "lista")
803 #if($el && $el.trim() != "")
804 <ul class="${element.cssclass}">
805 #set($tempArrayText = $el.data.trim().replaceAll("&","&").split("</p>"))
806 #foreach($parrafo in $tempArrayText)
807 #set($parrafo = $parrafo.replaceAll("<p>", "").replaceAll("</p>", "").trim())
808 #if($parrafo != "")
809## #set($contadorParrafos = $contadorParrafos + 1)
810## #if($contadorParrafos == 2)
811## $!iterVelocityTools.getAdContainer("M02_cpm_r_dcha")
812## #elseif($contadorParrafos == 5)
813## $!iterVelocityTools.getAdContainer("M04_cpm_r_dchab")
814## #elseif($contadorParrafos == 9)
815## $!iterVelocityTools.getAdContainer("M07_cpm_r_dchac")
816## #end
817 ##if($environment == "LIVE" && $reserved-article-id.data.contains("NM") == false)
818 ## <li><?php format_post_content('<?xml encoding="utf-8" ?>$parrafo')?></li>
819 ##else
820 <li>$!parrafo</li>
821 ##end
822 #end
823 #end
824 </ul>
825 #end
826 #end
827 #if($element.name == "lista_numerica")
828 #if($el && $el.trim() != "")
829 <ol class="${element.cssclass}">
830 #set($tempArrayText = $el.data.trim().replaceAll("&","&").split("</p>"))
831 #foreach($parrafo in $tempArrayText)
832 #set($parrafo = $parrafo.replaceAll("<p>", "").replaceAll("</p>", "").trim())
833 #if($parrafo != "")
834## #set($contadorParrafos = $contadorParrafos + 1)
835## #if($contadorParrafos == 2)
836## $!iterVelocityTools.getAdContainer("M02_cpm_r_dcha")
837## #elseif($contadorParrafos == 5)
838## $!iterVelocityTools.getAdContainer("M04_cpm_r_dchab")
839## #elseif($contadorParrafos == 9)
840## $!iterVelocityTools.getAdContainer("M07_cpm_r_dchac")
841## #end
842 ##if($environment == "LIVE" && $reserved-article-id.data.contains("NM") == false)
843 ## <li><?php format_post_content('<?xml encoding="utf-8" ?>$parrafo')?></li>
844 ##else
845 <li>$!parrafo</li>
846 ##end
847 #end
848 #end
849 </ol>
850 #end
851 #end
852
853 #if($element.name == "Question")
854 #if($el && $el.trim() != "")
855 #set($namespace = $randomNamespace)
856 #initPoll_v1
857 <div class="${element.cssclass}" $!tempIter groupId="$groupId" questionId="$Question.questionid">
858 <div class="question-poll">
859 ##QUESTION
860 <h3 class="headline question">$!Question.data</h2>
861 </div> <!-- Fin div question-poll -->
862 ##CHOICES
863 <div class="${namespace}_choices visible">
864 #if ($Question && $Question.Answer && $Question.Answer.getSiblings() && $Question.Answer.getSiblings().size() > 0)
865 <form id="${namespace}_form" name="${namespace}_form" class="${namespace}_form" >
866 <input name="questionId" type="hidden" value="$Question.questionid" />
867 #foreach ($answer in $Question.Answer.getSiblings())
868 <span class="choice"><input type="radio" value="$answer.choiceid" name="choiceId" class="choiceOption">$answer.data</span>
869 #end
870 <span class="vote-btn btn">Vota</span>
871 </form>
872 #end
873 </div> <!-- Fin div choices -->
874 <div class="${namespace}_results hidden"></div>
875
876 </div>
877 <script>
878 jQuery(".${namespace}_form .vote-btn.btn").bind("click",function(){
879 var resultVote = IterPoll.vote(jQuery('.${namespace}_form'),JSON.parse('#getPollJson_v1'));
880 console.log("resultVote = " + resultVote);
881 if(resultVote == true){
882 IterPoll.getPollData(JSON.parse('#getPollJson_v1'),".${namespace}_results",IterPoll.printPollResultSimple);
883 }
884 jQuery(".${namespace}_results").addClass("visible");
885 jQuery(".${namespace}_choices").addClass("hidden");
886 jQuery(".${namespace}_choices").removeClass("visible");
887 jQuery(".${namespace}_results").removeClass("hidden");
888 })
889 </script>
890 #end
891 #end
892 ## cssclass
893 #end
894 ## childrenTags
895 #set($currentElement = $currentElement + 1)
896 #end
897 ##**************************************************************************
898 </div> <!-- Fin div text -->
899
900 #if($auxCatalagoTema.size() > 0 || $auxCatalagoMarcas.size() > 0)
901 <div class="categoryList">
902 #foreach($keyword in $auxCatalagoTema)
903 <article class="categoryListItem categoryArticleItem" data-categoryid="$keyword.id" data-categoryname="$keyword.name">
904 <a href="https://neomotor.epe.es/tag/-/meta/$keyword.friendlyname" title="$keyword.name"><span class="categoryListItemLink linkDisabled">$keyword.name</span></a>
905 </article>
906#set($metaSiteName = {})
907#set($temp = $metaSiteName.put("name","og:tag"))
908#set($temp = $metaSiteName.put("content","$keyword.name"))
909$iterVelocityTools.addMetaTag( $metaSiteName )
910 #end
911
912 #foreach($keyword in $auxCatalagoMarcas)
913 <article class="categoryListItem categoryArticleItem" data-categoryid="$keyword.id" data-categoryname="$keyword.name">
914 <a href="https://neomotor.epe.es/tag/-/meta/$keyword.friendlyname" title="$keyword.name"><span class="categoryListItemLink linkDisabled">$keyword.name</span></a>
915 </article>
916#set($metaSiteName = {})
917#set($temp = $metaSiteName.put("name","og:tag"))
918#set($temp = $metaSiteName.put("content","$keyword.name"))
919$iterVelocityTools.addMetaTag( $metaSiteName )
920 #end
921 </div>
922 #end
923
924 #set ($articlesrelacionados = $articleToolbox.getRelatedArticles( "link", 3 ) )
925 #if($articlesrelacionados.size() > 0)
926 <div class="relacionadas">
927 <div class="head_relacionadas">Relacionadas</div>
928 #foreach ($relacionada in $articlesrelacionados )
929 <div class="item_rel">
930 #set($hasImages = $relacionada.getNumImageTags("Image", "true"))
931 #if($hasImages > 0)
932 <div class="top-section">
933 <div class="top-image">$relacionada.getImageTag("Image","0","crop250x210","","","", "true", "", "")</div>
934 </div>
935 #end
936 <div class="headline_rel">
937 <a href="https://neomotor.epe.es/conduccion/$relacionada.reserved-article-url.data"><h3>$!relacionada.getTag(null,"Headline").data</h3></a>
938 </div>
939 #set($ac-sectionDateFrom = $articleContext.selectNodes('articlectx/sections//section[@from]'))
940 #if($ac-sectionDateFrom.size() > 0)
941 #foreach ($atrib in $ac-sectionDateFrom.get(0).attributes() )
942 #if($atrib.name == "name")
943 <div class="section_rel"><span class="assigned-section" >$!atrib.data </span></div>
944 #end
945 #end
946 #end
947
948 </div>
949 #end
950 </div>
951 #end
952
953 $!iterVelocityTools.getAdContainer("M08_Outbtrain")
954<!-- contadorParrafos : $contadorParrafos -->
955 <div class="ad_mob_end"></div>
956
957## #if($contadorParrafos <= 4)
958## $!iterVelocityTools.getAdContainer("M04_cpm_r_dchab")
959## $!iterVelocityTools.getAdContainer("M07_cpm_r_dchac")
960## #elseif($contadorParrafos <= 8)
961## $!iterVelocityTools.getAdContainer("M07_cpm_r_dchac")
962## #end
963
964 </div>
965 <div class="layout col-60-40-top-two-col col-xs-12 col-md-4 portlet-column nopadding detalle_der" id="col-60-40-top-two-col">
966 <div class="only_desktop" style="min-height: 700px"><div class="ad ad--sticky roba700">$!iterVelocityTools.getAdContainer("D03_cpm_r_dcha")</div></div>
967 <div class="ocasión">
968 <div id="cx_widget" style="min-height:510px;" class="_mo_recs_$reserved-article-id.data" data-recs="4"></div>
969 <script>
970 window._mo = window._mo || {};
971 window._mo.execQue = window._mo.execQue || [];
972 window._mo.execQue.push({
973 "function": function () {
974 _mo.recommend([36], ['_mo_recs_$reserved-article-id.data'])
975 }
976 });
977 </script>
978 </div>
979 <div class="only_desktop" style="min-height: 700px"><div class="ad ad--sticky roba700">$!iterVelocityTools.getAdContainer("D05_cpm_r_dchab")</div></div>
980
981 <div class="ranking_scroll">
982 <div class="ranking-viewer-portlet ranking_render_infinity ra_$reserved-article-id.data" style="display:table;">
983 <div class="ranking_contents">
984 <div class="item_content"></div>
985 </div>
986 </div>
987 <script>
988 jQryIter(document).bind("rankingCompleteLoad", function(e,id){
989 if($($(".ranking_render_infinity.ra_$reserved-article-id.data .item_content")[0]).html().trim() == ""){
990 $(".ranking_render_infinity.ra_$reserved-article-id.data .item_content").append($($(".ranking_detalle.mes .iter-tabview")[0]).html());
991 }
992 });
993 </script>
994 </div>
995
996
997 <div class="only_desktop" style="min-height: 700px"><div class="ad ad--sticky roba700">$!iterVelocityTools.getAdContainer("D06_cpm_r_dchac")</div></div>
998 </div>
999 </div>
1000 </div>
1001
1002
1003
1004
1005 </div>
1006 </div>
1007 </div>
1008
1009 <div class="content-infinity"></div>
1010</div>
1011
1012#if($environment == "LIVE")
1013<?php
1014 function format_post_content($content) {
1015 $document = new DOMDocument();
1016 $document->loadHTML($content);
1017 $tags = $document->getElementsByTagName('a');
1018 foreach ($tags as $tag) {
1019 if( strpos($tag->getAttribute('href'),'neomotor') > 0 ){
1020 $tag->removeAttribute('rel');
1021 $tag->removeAttribute('target');
1022 $tag->setAttribute('title', $tag->nodeValue);
1023 }
1024 }
1025 $html_1 = $document->saveHTML($document->documentElement);
1026 $html_1 = str_replace("<body>", "", $html_1);
1027 $html_1 = str_replace("<html>", "", $html_1);
1028 $html_1 = str_replace("<p>", "", $html_1);
1029 $html_1 = str_replace("</p>", "", $html_1);
1030 $html_1 = str_replace("</html>", "", $html_1);
1031 $html_1 = str_replace("</body>", "", $html_1);
1032 echo $html_1;
1033 }
1034?>
1035#end
1036<script type="text/javascript" nominify>
1037
1038 ## En mobile añadimos los espacios roba en el texto */
1039 if(isMobileEnvironment){
1040 var n_p = $(".text p").length;
1041 /* MAS DE 1 PARRAFOS DESPUES DEL 1*/
1042 if(n_p > 1){
1043 $('.text .p_1').after("<div id='movil-div-gpt-ad_300dcha'></div>");
1044 }
1045 else{
1046 $(".ad_mob_end").append("<div id='movil-div-gpt-ad_300dcha'></div>");
1047 }
1048 /* MAS DE 4 PARRAFOS DESPUES DEL 4*/
1049 if(n_p > 4){
1050 $(".text .p_4").after("<div id='movil-div-gpt-ad_300dchab'></div>");
1051 }
1052 else{
1053 $(".ad_mob_end").append("<div id='movil-div-gpt-ad_300dchab'></div>");
1054 }
1055 /* MAS DE 8 PARRAFOS DESPUES DEL 8 */
1056 if(n_p > 8){
1057 $(".text .p_8").after("<div id='movil-div-gpt-ad_300dchac'></div>");
1058 }
1059 else{
1060 $(".ad_mob_end").append("<div id='movil-div-gpt-ad_300dchac'></div>");
1061 }
1062 }
1063
1064function pushDatalayerGalery(n_foto) {
1065 dataLayer.push({
1066 "event":"virtual-pageview",
1067 "content":{
1068 "type":{
1069 "cms":"fotogaleria"
1070 }
1071 },
1072 "page":{
1073 "page.view_id": Math.floor(Date.now() / 1000),
1074 "virtual_pageview": n_foto
1075 },
1076 'path': window.location.pathname + '?foto=' + n_foto
1077 })
1078}
1079
1080#set ($xml =$articleContext.selectNodes('//section'))
1081#set($nivel = 1)
1082#set($pagname = "")
1083#set($secc1 = "")
1084#set($secc2 = "undefined")
1085#foreach ($nodexml in $xml )
1086 #if($nivel < 4)
1087 #set($secc = $htmlUtil.escape($!nodexml.attribute('name').getValue()))
1088 #set($secc = $secc.replaceAll("\n", "") )
1089 #set($seccID = $htmlUtil.escape($!nodexml.attribute('id').getValue()))
1090 #if($nivel == 1)
1091 #set($secc1 = $secc)
1092 #elseif($nivel == 2)
1093 #set($secc2 = $secc)
1094 #end
1095 #set($nivel = $nivel + 1)
1096 #end
1097#end
1098
1099#if($iterVelocityTools.getVelocityVariable("teaseritemposition") == 1)
1100var _even = "pageview";
1101var _cms = "noticia";
1102var _previous = undefined;
1103#else
1104var _even = "virtual-pageview";
1105var _cms = "noticia scroll";
1106var _previous = window.location.origin;
1107#end
1108#set($date_s = "#printDateFrom_v1('yyy-MM-dd')" )
1109#set($mask_d = "YYYY-MM-dd'T'HH:mm:ssZZ")
1110#set($date_m = "#printDateFrom_v1($mask_d)" )
1111##PONEMOS LOS : EN EL DESPLAZAMIENTO UTC
1112#set($date_m = $date_m.trim())
1113#set($tam = $date_m.length() - 2)
1114#set($val-1 = $date_m.substring(0, $tam))
1115#set($val-2 = $date_m.substring($tam))
1116#set($date_m = $val-1 + ":" + $val-2)
1117if(isMobileEnvironment) {
1118 var m_ads = "cpm_m|cpm_r_dcha|cpm_r_dchab|cpm_r_dchac|Outbrain|cpm_mf"
1119}
1120else {
1121 var m_ads = "cpm_si|cpm_sd|cpm_m|cpm_r_dcha|cpm_r_dchab|cpm_r_dchac|Outbrain"
1122}
1123## ************ CONTENT.MULTIMEDIA ************
1124#set($multimedia = "")
1125#if($hasImages == 1)
1126 #set($multimedia = "imagen")
1127#elseif($hasImages > 1)
1128 #set($multimedia = "galeria")
1129#end
1130#getTagMacro_v1($Multimedia, '', 'Multimedia', -1, '', '')
1131#if($Multimedia && $Multimedia.Document.data)
1132 #if($Multimedia.Extension.data && $Multimedia.Extension.data == "mp3")
1133 #if($multimedia == "")
1134 #set($multimedia = $multimedia + "audio")
1135 #else
1136 #set($multimedia = $multimedia + "|audio")
1137 #end
1138 #elseif ($Multimedia.Extension.data && $Multimedia.Extension.data == "mp4")
1139 #if($multimedia == "")
1140 #set($multimedia = $multimedia + "video")
1141 #else
1142 #set($multimedia = $multimedia + "|video")
1143 #end
1144 #end
1145#end
1146#getTagMacro_v1($Vimeo, '', 'Vimeo', -1, '', '')
1147#if($Vimeo && $Vimeo.data)
1148 #if($multimedia == "")
1149 #set($multimedia = $multimedia + "video")
1150 #else
1151 #set($multimedia = $multimedia + "|video")
1152 #end
1153#end
1154#getTagMacro_v1($Youtube, '', 'Youtube', -1, '', '')
1155#if($Youtube && $Youtube.data)
1156 #if($multimedia == "")
1157 #set($multimedia = $multimedia + "video")
1158 #else
1159 #set($multimedia = $multimedia + "|video")
1160 #end
1161#end
1162
1163#if($secc2 != 'undefined')
1164 #set($secc2 = '"'+$secc2+'"')
1165#end
1166
1167
1168window.dataLayer = window.dataLayer || [];
1169window.dataLayer.push(
1170{
1171 "event": _even,
1172 "ads": {
1173 "enabled": undefined,
1174 "positions": m_ads
1175 },
1176 "campaign": {
1177 "medium": undefined,
1178 "name": undefined,
1179 "source": undefined
1180 },
1181 "content": {
1182 "access": "abierto",
1183 "branded": undefined,
1184 "category": "motor y conduccion",
1185 "date": {
1186 "modification": "$date_m.trim()",
1187 "publication": "$date_m.trim()",
1188 "publication_short": "$date_s.trim()"
1189 },
1190 "front": "1",
1191 "id": "$reserved-article-id.data",
1192 "local": {
1193 "city": undefined,
1194 "province": undefined,
1195 "region": undefined
1196 },
1197 "local_is": "0",
1198 "multimedia": "$multimedia",
1199 "origin": "gzp",
1200 "person": {
1201 "author": "$autorfinal",
1202 "editor": "$autorfinal",
1203 "signin": undefined
1204 },
1205 "place": undefined,
1206 "pretitle": undefined,
1207 "read": {
1208 "time": Math.round(($(".text").text().split(' ').length * 60) / 250).toString()
1209 },
1210 "related": "0",
1211 "search": undefined,
1212 "section": {
1213 "level_1": "neomotor",
1214 "level_2": "$secc1",
1215 "level_3": $secc2
1216 },
1217 "social": undefined,
1218 "tag": $keywordsfinal_datalayer,
1219 "type": {
1220 "cms": _cms
1221 },
1222 "words": $(".text").text().split(' ').length
1223 },
1224 "page": {
1225 "h1": (!document.querySelector('h1')) ? 'null': document.querySelector('h1').textContent,
1226 "notifications": Notification.permission,
1227 "referrer": document.referrer,
1228 "response": "200",
1229 "view_id": Math.floor(Date.now() / 1000),
1230 "title": document.title,
1231 "url": {
1232 "complete": window.location.href,
1233 "domain": "neomotor.com",
1234 "hostname": "www.neomotor.com",
1235 "parameters": undefined,
1236 "path": window.location.pathname
1237 }
1238 },
1239 "product": {
1240 "platform": "web"
1241 },
1242 "video": {
1243 "author": undefined,
1244 "origin": undefined,
1245 "title": undefined,
1246 "type": undefined
1247 }
1248} );
1249
1250
1251
1252
1253 </script>
1254
1255
1256#if($iterVelocityTools.getVelocityVariable("teaseritemposition") == 1)
1257 #set ($Headline = "")
1258 #getTagMacro_v1($Headline, '', 'Headline', -1, '', '')
1259 #set($TituloEsc = $htmlUtil.escape($!Headline.data))
1260 #set($TituloEsc = $TituloEsc.replaceAll("\n", ""))
1261 #set ($Text = "")
1262 #getTagMacro_v1($Text, '', 'Text', -1, '', '')
1263 #set ($TextArt = $!Text.data)
1264 #set($TextArt = $TextArt.replaceAll("<.*?>","") )
1265 #set($TextArt = $TextArt.trim() )
1266 #set($TextoFinal = $htmlUtil.escape($TextArt))
1267
1268 #set ($tempSubheadline = "#getTeaserSubheadline_v1(false)")
1269 #if($tempSubheadline && $tempSubheadline != "")
1270 #set($Texto = $tempSubheadline )
1271 #set($Texto = $Texto.replaceAll("<.*?>","") )
1272 #set($Texto = $Texto.trim() )
1273 #set($TextoEsc = $htmlUtil.escape($Texto))
1274 #else
1275 #set($Texto = $TextoFinal )
1276 #end
1277
1278 #set($logo = "$!iterVelocityTools.getVariable('0','logo_datos')" )
1279 #set($logo = $logo.trim() )
1280 #set($logo = $htmlUtil.escape($logo))
1281 #set($logo = $logo.replaceAll("https://neomotor.epe.es/","\/") )
1282 #set($section = "")
1283 #set($section_url = "")
1284 #set($ac-sectionDateFrom = $articleContext.selectNodes('articlectx/sections//section[@from]'))
1285 #if($ac-sectionDateFrom && $ac-sectionDateFrom.size() > 0)
1286 #foreach ($atrib in $ac-sectionDateFrom.get(0).attributes() )
1287 #if($atrib.name == "name")
1288 #set($section = $!atrib.data)
1289 #end
1290 #if($atrib.name == "url")
1291 #set($section_url = $!atrib.data)
1292 #end
1293
1294 #end
1295 #end
1296
1297
1298##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1299## VIDEOS EN JSON ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1300##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1301#set($cont_video = '')
1302#set ($Youtube_Text = "")
1303#getTagMacro_v1($Youtube_Text, '', 'Youtube_Text', -1, '', '')
1304
1305#if(($Multimedia && $Multimedia.Document.data) || ($Youtube_Text && $Youtube_Text.data) || ($Vimeo && $Vimeo.data ) || ($Youtube && $Youtube.data))
1306 #if($Multimedia && $Multimedia.Document.data != '')
1307 #set ($Multimedia = "")
1308 #getTagMacro_v1($Multimedia, '', 'Multimedia', -1, '', '')
1309 #foreach ($el in $Multimedia.getSiblings())
1310 #if ($el.Extension.data && $el.Extension.data == "mp4")
1311 #if($cont_video != "")
1312 #set($cont_video = $cont_video + ',')
1313 #end
1314 #set($cont_video = $cont_video +'{"@type": "VideoObject","name": "Interno","description": "","thumbnailUrl": "'+$!el.Preview.data+'","uploadDate": "'+$reserved-article-display-date.data+'","url": "'+$!el.Document.data+'"}')
1315 #end
1316 #end
1317 #end
1318 #if($Youtube && $Youtube.data)
1319 #set ($Youtube = "")
1320 #getTagMacro_v1($Youtube, '', 'Youtube', -1, '', '')
1321 #foreach ($el in $Youtube.getSiblings())
1322 #if($cont_video != "")
1323 #set($cont_video = $cont_video + ',')
1324 #end
1325 #set($cont_video = $cont_video + '{"@type": "VideoObject","name": "Youtube","description": "","thumbnailUrl": "https://img.youtube.com/vi/'+$el.data+'/maxresdefault.jpg","uploadDate": "'+$reserved-article-display-date.data+'","url": "https://www.youtube.com/embed/'+$el.data+'"}')
1326 #end
1327 #end
1328 #if($Youtube_Text && $Youtube_Text.data)
1329 #set ($Youtube_Text = "")
1330 #getTagMacro_v1($Youtube_Text, '', 'Youtube_Text', -1, '', '')
1331 #foreach ($el in $Youtube_Text.getSiblings())
1332 #if($cont_video != "")
1333 #set($cont_video = $cont_video + ',')
1334 #end
1335 #set($cont_video = $cont_video + '{"@type": "VideoObject","name": "Youtube","description": "", "thumbnailUrl": "https://img.youtube.com/vi/'+$el.data+'/maxresdefault.jpg","uploadDate": "'+$reserved-article-display-date.data+'","url": "www.youtube.com/embed/'+$el.data+'"}')
1336 #end
1337 #end
1338#end
1339##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1340## IMAGES EN JSON ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1341##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1342#set($cont_image="")
1343#set ($numImage = $articleToolbox.getNumImageTags("Image", "true"))
1344#if(!$numImage)
1345 #set ($numImage = 0)
1346#end
1347#if($numImage > 0)
1348 #set ($numImageFor = $numImage - 1)
1349 #foreach($i in [0..$numImageFor])
1350 #set($NodeImage = $articleToolbox.getImageNode("Image", "$i", "true"))
1351 #set($UrlImage = $articleToolbox.getImageURL("Image", "$i", "crop1200x980"))
1352 #if($cont_image != "")
1353 #set($cont_image = $cont_image + ',')
1354 #end
1355 #set($cont_image = $cont_image + '{"@type": "ImageObject","url": "'+$UrlImage+'","datePublished": "'+$reserved-article-display-date.data+'"')
1356 #if($!NodeImage.Byline && $!NodeImage.Byline.data != "")
1357 #set($BylineImage = $!NodeImage.Byline.data)
1358 #set($cont_image = $cont_image + ',"author": "'+$!BylineImage+'"')
1359
1360 #end
1361 #if($!NodeImage.Cutline && $!NodeImage.Cutline.data != "")
1362 #set($CutlineImage = $!NodeImage.Cutline.data)
1363 #set($cont_image = $cont_image + ',"caption": "'+$CutlineImage+'","name": "'+$!CutlineImage+'"')
1364 #end
1365 #set($cont_image = $cont_image + '}')
1366 #end
1367
1368#end
1369#set ($numImageText = $articleToolbox.getNumImageTags("Image_Text", "true"))
1370#if(!$numImageText)
1371 #set ($numImageText = 0)
1372#end
1373#if($numImageText > 0)
1374 #set ($numImageForT = $numImageText - 1)
1375 #foreach($i in [0..$numImageForT])
1376 #set($NodeImage = $articleToolbox.getImageNode("Image_Text", "$i", "true"))
1377 #set($UrlImage = $articleToolbox.getImageURL("Image_Text", "$i", "crop1200x980"))
1378 #if($cont_image != "")
1379 #set($cont_image = $cont_image + ',')
1380 #end
1381 #set($cont_image = $cont_image + '{"@type": "ImageObject","url": "'+$UrlImage+'","datePublished": "'+$reserved-article-display-date.data+'"')
1382 #if($!NodeImage.Byline && $!NodeImage.Byline.data != "")
1383 #set($BylineImage = $!NodeImage.Byline.data)
1384 #set($cont_image = $cont_image + ',"author": "'+$!BylineImage+'"')
1385
1386 #end
1387 #if($!NodeImage.Cutline && $!NodeImage.Cutline.data != "")
1388 #set($CutlineImage = $!NodeImage.Cutline.data)
1389 #set($cont_image = $cont_image + ',"caption": "'+$CutlineImage+'","name": "'+$!CutlineImage+'"')
1390 #end
1391 #set($cont_image = $cont_image + '}')
1392 #end
1393#end
1394
1395<script type="application/ld+json" nominify>
1396 {
1397 "@context": "http://schema.org",
1398 "@type": "NewsArticle",
1399 "mainEntityOfPage": {
1400 "@type": "WebPage",
1401 "@id": "#siteUrl()$url_actual"
1402 },
1403 "headline": "$TituloEsc",
1404#if($keywordsfinal != 'undefined')#*
1405*# "keywords": [ $keywordsfinal],#*
1406*##end
1407 "articleBody": "$TextoFinal",
1408 "url": "#siteUrl()$url_actual",
1409 "articleSection":"$section",
1410 "datePublished": "$reserved-article-display-date.data",
1411 "dateModified": "$reserved-article-modified-date.data",
1412 "author":[ {
1413 "@type": "Person",
1414 "name": "$autorfinal",
1415 "url": "#siteUrl()$autorUrl"
1416 }],
1417 "publisher": {
1418 "@type": "Organization",
1419 "name": "Neo Motor",
1420 "logo": {
1421 "@type": "ImageObject",
1422 "url": "$logo"
1423 }
1424 },
1425#if($cont_image != "")#*
1426*# "image":[$cont_image],#*
1427*##end#*
1428*##if($cont_video != "")#*
1429*# "video":[$cont_video],#*
1430*##end
1431 "description": "$TextoEsc"
1432 }
1433</script>
1434
1435#set($imagen_logo = $iterVelocityTools.getVariable("0","logo_datos"))
1436<script type="application/ld+json">
1437{"@context":"https://schema.org",
1438"@graph":[
1439{"@type":"Organization",
1440"@id":"https://neomotor.epe.es/organization",
1441"name":"Neomotor",
1442"url":"https://neomotor.epe.es/",
1443"sameAs":["https://www.facebook.com/Neomotorprensaiberica/","https://twitter.com/NeoMotor","https://www.instagram.com/neomotorprensaiberica/","https://www.youtube.com/channel/UCBGPJsdC2eTzLDJJajfSt9w"],
1444"logo":{"@type":"ImageObject","@id":"https://neomotor.epe.es/#logo",
1445"inLanguage":"es",
1446"url":"$imagen_logo","width":332,"height":40,"caption":"Neomotor"}},
1447{"@type":"WebSite","@id":"https://neomotor.epe.es/#website",
1448"url":"https://neomotor.epe.es/",
1449"name":"Neomotor","description":"Análisis de expertos del mundo del motor de las marcas y modelos de coches y motos del mercado. Consulta los vídeos con presentaciones, fichas técnicas, precios y competidores","publisher":{"@id":"https://neomotor.epe.es/#organization"},"inLanguage":"es"},
1450{"@type":"WebPage","@id":"https://neomotor.epe.es/#webpage","url":"https://neomotor.epe.es/","name":"Neomotor: coches, motos y todo motor",
1451"isPartOf":{"@id":"https://neomotor.epe.es/#website"},"about":{"@id":"https://neomotor.epe.es/#organization"},
1452"datePublished":"$reserved-article-modified-date.data","dateModified":"$reserved-article-display-date.data","description":"Análisis de expertos del mundo del motor de las marcas y modelos de coches y motos del mercado. Consulta los vídeos con presentaciones, fichas técnicas, precios y competidores","inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":[" https://neomotor.epe.es/"]}]}
1453]}</script>
1454
1455 #set($metaFrom = {})
1456 #set($temp = $metaFrom.put("property","article:published_time"))
1457 #set($temp = $metaFrom.put("content",$date_m.trim()))
1458 $iterVelocityTools.addMetaTag( $metaFrom )
1459
1460 #set($metaModif = {})
1461 #set($temp = $metaModif.put("property","article:modified_time"))
1462 #set($temp = $metaModif.put("content", $date_m.trim() ))
1463 $iterVelocityTools.addMetaTag( $metaModif )
1464
1465 #set($metaRobots = {})
1466 #set($temp = $metaRobots.put("name","robots"))
1467 #set($temp = $metaRobots.put("content", "max-image-preview:large" ))
1468 $iterVelocityTools.addMetaTag( $metaRobots )
1469
1470 #set($metaFaceApp = {})
1471 #set($temp = $metaFaceApp.put("property","fb:app_id"))
1472 #set($temp = $metaFaceApp.put("content","" ))
1473 ##$iterVelocityTools.addMetaTag( $metaFaceApp )
1474
1475 #set($metaFacePage = {})
1476 #set($temp = $metaFacePage.put("property","fb:pages"))
1477 #set($temp = $metaFacePage.put("content","" ))
1478 ##$iterVelocityTools.addMetaTag( $metaFacePage )
1479
1480 #set($metaSiteName = {})
1481 #set($temp = $metaSiteName.put("property","og:site_name"))
1482 #set($temp = $metaSiteName.put("content","NeoMotor" ))
1483 $iterVelocityTools.addMetaTag( $metaSiteName )
1484
1485
1486 #set($metaSiteName = {})
1487 #set($temp = $metaSiteName.put("name","twitter:description"))
1488 #set($temp = $metaSiteName.put("content",$TextoFinal))
1489 $iterVelocityTools.addMetaTag( $metaSiteName )
1490
1491 #set($url_image = "$!articleToolbox.getImageURL('Image', '0', 'crop1200x980')" )
1492 #set($metaSiteName = {})
1493 #set($temp = $metaSiteName.put("name","twitter:image"))
1494 #set($temp = $metaSiteName.put("content", $url_image))
1495 $iterVelocityTools.addMetaTag( $metaSiteName )
1496
1497 #set($metaSiteName = {})
1498 #set($temp = $metaSiteName.put("name","twitter:title"))
1499 #set($temp = $metaSiteName.put("content",$TituloEsc))
1500 $iterVelocityTools.addMetaTag( $metaSiteName )
1501
1502 ##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1503 ##++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1504 #set($metaSiteName = {})
1505 #set($temp = $metaSiteName.put("name","twitter:title"))
1506 #set($temp = $metaSiteName.put("content",$TituloEsc))
1507 $iterVelocityTools.addMetaTag( $metaSiteName )
1508
1509 #set($metaSiteName = {})
1510 #set($temp = $metaSiteName.put("name","twitter:site"))
1511 #set($temp = $metaSiteName.put("content","@NeoMotor"))
1512 $iterVelocityTools.addMetaTag( $metaSiteName )
1513
1514 #set($metaSiteName = {})
1515 #set($temp = $metaSiteName.put("name","twitter:card"))
1516 #set($temp = $metaSiteName.put("content","summary_large_image"))
1517 $iterVelocityTools.addMetaTag( $metaSiteName )
1518
1519 #set($metaSiteName = {})
1520 #set($temp = $metaSiteName.put("name","author"))
1521 #set($temp = $metaSiteName.put("content","$autorfinal"))
1522 $iterVelocityTools.addMetaTag( $metaSiteName )
1523
1524 #set($metaSiteName = {})
1525 #set($temp = $metaSiteName.put("name","publisher"))
1526 #set($temp = $metaSiteName.put("content","neomotor.epe.es"))
1527 $iterVelocityTools.addMetaTag( $metaSiteName )
1528
1529 #set($metaSiteName = {})
1530 #set($temp = $metaSiteName.put("name","og:section"))
1531 #set($temp = $metaSiteName.put("content","$section"))
1532 $iterVelocityTools.addMetaTag( $metaSiteName )
1533
1534 #if($articleToolbox.getTag(null, "SEOCanonical") && $articleToolbox.getTag(null, "SEOCanonical") != "")
1535 #set($linkCanonical = {})
1536 #set($URLCanonical = "https://" + $!articleToolbox.getTag(null, "SEOCanonical").data )
1537 #set($temp = $linkCanonical.put("rel","canonical"))
1538 #set($temp = $linkCanonical.put("href", $URLCanonical))
1539 $iterVelocityTools.addLinkTag( $linkCanonical )
1540 #end
1541#end
1542
1543<script>
1544#set ( $n_pal = 0 )
1545#foreach ($tx in $Text.getSiblings())
1546 #set ( $n_pal = $n_pal + $tx.data.split(" ").size() )
1547#end
1548console.log("PALABRAS: $n_pal ");
1549</script>