Comunicados de Prensa
Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy495.getArticleByUrlTitle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy495 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@3aaffc80"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign journalArticle = journalArtic... [in template "20116#20152#436570" at line 458, column 1] ----
1<#-- start getting entry data -->
2<#assign entryTitle = .vars['reserved-article-title'].data >
3<#assign entryDescription = .vars['reserved-article-description'].data >
4<#assign entryModifiedDate = .vars['reserved-article-modified-date'].data >
5<#assign originalLocale = .locale>
6<#assign modifiedDateMonth = entryModifiedDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")?date?string.MMM>
7<#assign modifiedDateDay = entryModifiedDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")?date?string.d>
8<#assign modifiedDateYear = entryModifiedDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")?date?string.yyyy>
9<#-- end getting entry data -->
10
11 <style>
12
13 .summary__title {
14 font-weight: bold;
15 text-align: left;
16 color: #1a1c20;
17 line-height: 1.5;
18 font-size: 40px;
19 margin: 15px 0 0 0;
20 padding: 0;
21 position: relative;
22 }
23
24 .summary__location {
25 font-size: 14px;
26 color: #1a1c20;
27 //padding-bottom: 60px;
28 padding-top: 10px;
29 }
30
31 .summary__description {
32 font-size: 18px;
33 font-weight: 500;
34 line-height: 1.44;
35 }
36
37 .summary__image {
38 width: 100%;
39 height: auto;
40
41 }
42
43 .body__separation {
44 border: solid 1px #48647c;
45 margin-top: 40px;
46 }
47
48 .body__highlight {
49 background-color: #fafafa;
50 }
51
52 .body__highlight p {
53 font-size: 24px;
54 font-style: italic;
55 line-height: 1.67;
56 text-align: left;
57 color: #2c539a;
58 padding: 48px 110px;
59 }
60
61 .body__image--left {
62 width: 415px;
63 margin-top: 10px;
64 margin-right: 10px;
65 }
66
67 .body__image--right {
68 width: 415px;
69 margin-top: 10px;
70 margin-left: 10px;
71 }
72
73 .body__disclaimer {
74 font-size: 14px;
75 font-style: italic;
76 line-height: 1.43;
77 color: #9b9b9b;
78 }
79
80 .body-list__item-image {
81 background-position: center;
82 background-repeat: no-repeat;
83 background-size: cover;
84 clear: both;
85 }
86
87 .contact__item {
88 display: inline-block;
89 }
90
91 .contact__item--left {
92 margin-right: 10px;
93 }
94
95 .contact__item--right {
96 margin-left: 10px;
97 }
98
99 .contact__header {
100 font-weight: 500;
101 margin-bottom: 15px;
102 }
103
104 .contact__item p {
105 padding-bottom: 0;
106 }
107
108
109 @media screen and (max-width: 1023px) {
110 .body__image--right {
111 width: 690px;
112 height: 517px;
113 margin-left : 0;
114 }
115
116 .body__image--left {
117 width:690px;
118 height: 517px;
119 margin-right: 0;
120 }
121 }
122
123 @media screen and (min-width: 1024px) and (max-width: 1199px) {
124 .body__image--right {
125 width: auto;
126 height: 219px;
127
128 }
129
130 .body__image--left {
131 width: auto;
132 height: 219px
133 }
134 }
135
136 @media screen and (min-width: 1200px) {
137 .body__image--right {
138 height: 311px;
139 }
140
141 .body__image--left {
142 height: 311px;
143 }
144
145 .summary__image {
146 height: 200px;
147 }
148 }
149</style>
150
151
152 <div class="container ">
153 <div class="row">
154 <div class="col-xs-12 col-sm-12 col-md-offset-2 col-md-8 col-lg-offset-2 col-lg-8">
155 <div class="row">
156 <h2 class="summary__title">${entryTitle}</h2>
157 <div class="summary__location">
158 <div id="validLanguageDate">
159 ${location.getData()}
160 <#if date.getData()?? && date.getData()?trim != "">
161 <#assign date_Data = getterUtil.getString(date.getData())>
162 <#if validator.isNotNull(date_Data)>
163 <#assign date_DateObj = dateUtil.parseDate("yyyy-MM-dd", date_Data, locale)>
164 ${dateUtil.getDate(date_DateObj, "dd MMM yyyy", locale)}
165 </#if>
166 </#if>
167
168
169 </div>
170 </div>
171 </div>
172 <#--
173 <div class="row">
174 <@mainImageMacro/>
175
176 </div>
177 -->
178 <hr class="body__separation">
179 <div class="row">
180 ${mainContent.getData()}
181 </div>
182 <br>
183 <div class = "row body__highlight">
184 ${quote.getData()}
185 </div>
186 <br>
187 <div class = "row">
188 <@image/>
189
190 </div>
191 <br>
192
193 <div class = "row">
194 ${secondaryContent.getData()}
195 </div>
196
197 <#if disclaimer?? && disclaimer.getData() !="" >
198 <div class = "row body__disclaimer">
199 ${disclaimer.getData()}
200 </div>
201 </#if>
202 <br>
203 <#list contactInfo.getSiblings() as contact>
204 <#if contact.getChild("contactName").getData()?? && contact.getChild("contactName").getData() != "">
205 <h2 class="contact__header">Contactos para información de CEMEX:</h2>
206 </#if>
207 </#list>
208 <div class="row">
209 <@obtainContactInfo contactInfo/>
210 </div>
211
212 </div>
213
214 </div>
215 </div>
216
217<#macro getImagesPadding index>
218 <#if index % 2 == 0>
219 body__image--left
220 <#else>
221 body__image--right
222 </#if>
223</#macro>
224
225<#macro image>
226 <#if images.getSiblings()?has_content>
227 <#if images.getSiblings()?size == 1>
228 <#list images.getSiblings() as cur_Image>
229 <#if cur_Image.getData()?? && cur_Image.getData() != "">
230 <#if (cur_Image.getAttribute("alt")?length > 0)>
231 <#assign title = cur_Image.getAttribute("alt")>
232 <#else>
233 <#assign title = "">
234 </#if>
235 <div class = "col-md-12">
236 <div class="frame">
237 <div>
238 <a href="${cur_Image.getData()}" class="gallery hover-scale hover-grayscale" title="${title}" >
239 <div class="responsive-image body-list__item-image full-width hover-scale-target hover-grayscale-target-60" title="${title}" style="background-image: url(${cur_Image.getData()}); height: 517px;">
240 </div>
241 </a>
242 </div>
243 </div>
244 </div>
245 </#if>
246
247 <#if cur_Image.getChild("YoutubeVideoId")?? >
248 <#assign youtubeId = cur_Image.getChild("YoutubeVideoId") >
249 <#assign hasYoutubeId = youtubeId?has_content && youtubeId.getData()?? && youtubeId.getData() != "" >
250 <#if hasYoutubeId>
251 <div class="frame youtube aspect-ratio aspect-ratio-16-to-9">
252 <iframe class="absolute-fill-parent" src="https://www.youtube.com/embed/${youtubeId.getData()}?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
253 </div>
254 </#if>
255 </#if>
256 </#list>
257
258 <#else>
259 <#if hasRepeatables(images)>
260 <#list images.getSiblings() as cur_Image>
261 <#if cur_Image.getData()?? && cur_Image.getData() != "">
262 <#if (cur_Image.getAttribute("alt")?length > 0)>
263 <#assign title = cur_Image.getAttribute("alt")>
264 <#else>
265 <#assign title = "">
266 </#if>
267 </#if>
268
269 <div class = "col-md-6 col-xs-12">
270 <div class="frame">
271 <div class>
272 <a href="${cur_Image.getData()}" class="gallery hover-scale hover-grayscale" title="${title}">
273
274 <div class="responsive-image body-list__item-image full-width hover-scale-target hover-grayscale-target-60 <@getImagesPadding cur_Image?index/>" title="${title}" style="background-image: url(${cur_Image.getData()});">
275 </div>
276 </a>
277 </div>
278 </div>
279 </div>
280 </#list>
281 </#if>
282 </#if>
283 </#if>
284</#macro>
285
286<#macro mainImageMacro>
287 <#if (entryDescription?length > 0)>
288 <#if mainImage.getData()?? && mainImage.getData() != "">
289 <#if (mainImage.getAttribute("alt")?length > 0)>
290 <#assign title = mainImage.getAttribute("alt")>
291 <#else>
292 <#assign title = "">
293 </#if>
294 <div class="col-md-8">
295 <div class="summary__description">
296 ${entryDescription}
297 </div>
298 </div>
299 <div class="col-md-4">
300 <div class="frame">
301 <a href="${mainImage.getData()}" class="gallery hover-scale hover-grayscale" title="${title}">
302 <img class="responsive-image full-width hover-scale-target hover-grayscale-target-60 summary__image" alt="${mainImage.getAttribute("alt")}" src="${mainImage.getData()}" />
303 </a>
304 </div>
305 </div>
306 <#else>
307 <div class="col-lg-12">
308 <div class="summary__description">
309 ${entryDescription}
310 </div>
311 </div>
312 </#if>
313 <#else>
314 <#if mainImage.getData()?? && mainImage.getData() != "">
315 <#if (mainImage.getAttribute("alt")?length > 0)>
316 <#assign title = mainImage.getAttribute("alt")>
317 <#else>
318 <#assign title = "">
319 </#if>
320 <div class="col-lg-12">
321 <div class="frame">
322 <a href="${mainImage.getData()}" class="gallery hover-scale hover-grayscale" title="${title}">
323 <img class="responsive-image full-width hover-scale-target hover-grayscale-target-60 summary__image" alt="${mainImage.getAttribute("alt")}" src="${mainImage.getData()}" />
324 </a>
325 </div>
326 </div>
327 </#if>
328 </#if>
329</#macro>
330
331
332<#macro obtainContactInfo repeatableField>
333 <#if hasRepeatables(repeatableField)>
334 <#list repeatableField.getSiblings() as contact>
335 <#if contact.getChild("contactDepartment").getData()?? && contact.getChild("contactDepartment").getData() != "">
336 <#assign contactDepartment = contact.getChild("contactDepartment").getData()>
337 <#else>
338 <#assign contactDepartment = "">
339 </#if>
340 <#if contact.getChild("contactProject").getData()?? && contact.getChild("contactProject").getData() != "">
341 <#assign contactProject = contact.getChild("contactProject").getData()>
342 <#else>
343 <#assign contactProject = "">
344 </#if>
345 <#if contact.getChild("contactName").getData()?? && contact.getChild("contactName").getData() != "">
346 <#assign contactName = contact.getChild("contactName").getData()>
347 <#else>
348 <#assign contactName = "">
349 </#if>
350 <#if contact.getChild("contactPhone").getData()?? && contact.getChild("contactPhone").getData() != "">
351 <#assign contactPhone = contact.getChild("contactPhone").getData()>
352 <#else>
353 <#assign contactPhone = "">
354 </#if>
355 <#if contact.getChild("contactEmail")?? && contact.getChild("contactEmail").getData() != "">
356 <#assign contactEmail = contact.getChild("contactEmail").getData()>
357 <#else>
358 <#assign contactEmail = "">
359 </#if>
360
361 <span class="contact__item <@getContactMargin contact?index/>">
362 <div>
363 <strong>${contactDepartment}</strong>
364 </div>
365 <div>
366 <strong>${contactProject}</strong>
367 </div>
368 <div>
369 <strong>${contactName}</strong>
370 </div>
371 <div>
372 ${contactPhone}
373 </div>
374 <div>
375 <a href="mailto:${contactEmail}">
376 ${contactEmail}
377 </a>
378 </div>
379 </span>
380 </#list>
381
382 </#if>
383</#macro>
384
385<#function hasRepeatables repeatableField>
386 <#if repeatableField.getSiblings()?has_content>
387 <#return true>
388 <#else>
389 <#return false>
390 </#if>
391
392</#function>
393
394<#macro getContactMargin index>
395 <#if index % 2 == 0>
396 contact__item--left
397 <#else>
398 contact__item--right
399 </#if>
400</#macro>
401
402
403
404
405<script>
406
407
408AUI().ready(function() {
409 $('.gallery').magnificPopup({
410 type:'image',
411 closeOnContentClick: false,
412 closeBtnInside: false,
413 mainClass: 'mfp-with-zoom mfp-img-mobile',
414 image: {
415 verticalFit: true,
416 titleSrc: function(item) {
417 var html = $.parseHTML( item.el.attr('title') );
418 return html;
419 }
420 },
421 gallery: {
422 enabled: true
423 }
424
425 });
426 /*var validDate = Base22.translationsJSON.${locale}.${modifiedDateMonth} + " " + ${modifiedDateDay} + "," + " " + ${modifiedDateYear} + " " +document.getElementById("validLanguageDate").innerText;
427 document.getElementById("validLanguageDate").innerHTML = "<p>" + validDate + "</p>"*/
428
429});
430
431</script>
432
433<#-- content group category -->
434<#assign groupId=themeDisplay.getScopeGroupId() ?number>
435<#assign assetVocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
436<#assign categoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
437<#assign portletLocalService=serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService") />
438<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
439<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
440
441<#assign urlTitle = themeDisplay.getURLCurrent()/>
442<#assign beginIndex = themeDisplay.getURLCurrent()?last_index_of("/")+1 />
443<#assign endIndex = urlTitle?index_of("?fbclid")-1/>
444<!-- Removes facebook tracking code that is added when a PR is open from a link on facebook's website -->
445<#if endIndex gt -1>
446 <#assign urlTitle = urlTitle[beginIndex..endIndex]/>
447<#else>
448 <#assign urlTitle=themeDisplay.getURLCurrent()?substring(themeDisplay.getURLCurrent()?last_index_of("/")+1) />
449</#if>
450
451<#assign parentVocabularyName="Content Groups (GA4)">
452<#assign parentVocabulary= assetVocabularyLocalService.getGroupVocabulary(groupId,parentVocabularyName) />
453<#assign childCategories=categoryLocalService.getVocabularyCategories(parentVocabulary.getVocabularyId(),-1,-1,null)>
454
455<#assign finalCategories="" />
456<#assign articleCategories=[]>
457
458<#assign journalArticle=journalArticleLocalService.getArticleByUrlTitle(groupId,urlTitle) >
459<#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",journalArticle.getResourcePrimKey()) />
460<#assign articleCategories=assetEntry.getCategories() />
461
462<#list childCategories as category>
463 <#list articleCategories as articleCategory>
464 <#if category.getName() == articleCategory.getName()>
465 <#if finalCategories?has_content>
466 <#assign finalCategories = finalCategories + ", "+(articleCategory.getName()) />
467 <#else>
468 <#assign finalCategories=articleCategory.getName() >
469 </#if>
470
471 </#if>
472 </#list>
473</#list>
474
475<script>
476 var contentGroupElement = $("#content_group");
477
478 if(location.pathname.includes("/-/")) {
479 if(contentGroupElement.length !== 0) contentGroupElement.val("");
480 }
481
482 if("${finalCategories}" !== ""){
483 var elementValue = "${finalCategories}"
484 if(contentGroupElement.length === 0) $("body").append('<input type="hidden" id="content_group" name="content_group" value="'+elementValue+'">')
485 else contentGroupElement.val(elementValue)
486 }
487</script>
488<#-- End content group category -->