Información Premio Obras
Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy575.getArticleByUrlTitle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy575 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@1c36441b"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign journalArticle = journalArtic... [in template "20116#20152#184987" at line 516, 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 .summary__collapsable-attachment {
150 display: flex;
151 }
152 .summary__collapsable-attachment-icon {
153 width: 31px;
154 height: 40px;
155 background-position: -657px -592px;
156 }
157 .summary__collapsable-attachment-icon {
158 margin-right: 10px;
159 height: 40px;
160 }
161 .summary__collapsable-attachment-name {
162 margin-top: 10px;
163 }
164</style>
165
166
167 <div class="container ">
168 <div class="row">
169 <div class="col-xs-12 col-sm-12 col-md-offset-2 col-md-8 col-lg-offset-2 col-lg-8">
170 <div class="row">
171 <h2 class="summary__title">${entryTitle}</h2>
172 <div class="summary__location">
173 <div id="validLanguageDate">
174 ${location.getData()}
175 <#if date.getData()?? && date.getData()?trim != "">
176 <#assign date_Data = getterUtil.getString(date.getData())>
177 <#if validator.isNotNull(date_Data)>
178 <#assign date_DateObj = dateUtil.parseDate("yyyy-MM-dd", date_Data, locale)>
179 ${dateUtil.getDate(date_DateObj, "dd MMM yyyy", locale)}
180 </#if>
181 </#if>
182
183
184 </div>
185 </div>
186 </div>
187 <#--
188 <div class="row">
189 <@mainImageMacro/>
190
191 </div>
192 -->
193 <hr class="body__separation">
194 <div class="row">
195 ${mainContent.getData()}
196 </div>
197 <div class="row">
198 <#if attachment.getData()?? && attachment.getData() != "">
199 <div>
200 <div class="summary__collapsable-attachment-title">
201 Ver archivo:
202 </div>
203 <#assign fileURL = attachment.getData()>
204 <div class="summary__collapsable-attachment">
205 <div class="summary__collapsable-attachment-icon cemex-icons"></div>
206 <a class="summary__collapsable-attachment-name" target="_blank" href="${attachment.getData()}">
207 <@getAttachmentProperties fileURL />
208 <i class="fa fa-angle-double-right" aria-hidden="true" style="padding-left: 12px;"></i>
209 </a>
210 </div>
211 </div>
212 </#if>
213 </div>
214 <br>
215 <div class = "row body__highlight">
216 ${quote.getData()}
217 </div>
218 <br>
219 <div class = "row">
220 <@image/>
221
222 </div>
223 <br>
224
225 <div class = "row">
226 ${secondaryContent.getData()}
227 </div>
228
229
230
231 <#if disclaimer?? && disclaimer.getData() !="" >
232 <div class = "row body__disclaimer">
233 ${disclaimer.getData()}
234 </div>
235 </#if>
236 <br>
237
238 <#if (contactInfo.getSiblings()?size > 0)>
239 <h2 class="contact__header">Contactos para información de CEMEX:</h2>
240 </#if>
241 <div class="row">
242 <@obtainContactInfo contactInfo/>
243 </div>
244
245 </div>
246
247 </div>
248 </div>
249
250
251<#macro getAttachmentProperties attachmentURL>
252 <#assign counter = 0 >
253 <#list attachmentURL?split("/") as chunkURL>
254 <#if counter == 2>
255 <#assign groupId = chunkURL?number >
256 </#if>
257 <#if counter == 3>
258 <#if chunkURL?index_of("?") != -1>
259 <#assign uuId = chunkURL?substring(0, chunkURL?index_of("?")) >
260 <#else>
261 <#assign uuId = chunkURL >
262 </#if>
263 </#if>
264 <#if counter == 4>
265 <#assign attacmentName = chunkURL >
266 </#if>
267 <#assign counter = counter+1 >
268 </#list>
269 <#assign fileEntry = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"]>
270 <#-- <#assign file= fileEntry.getFileEntry(getterUtil.getLong(groupId), uuId,) > -->
271 <#assign fileName = attacmentName>
272 <span>${fileName}</span>
273</#macro>
274
275<#macro getImagesPadding index>
276 <#if index % 2 == 0>
277 body__image--left
278 <#else>
279 body__image--right
280 </#if>
281</#macro>
282
283<#macro image>
284 <#if images.getSiblings()?has_content>
285 <#if images.getSiblings()?size == 1>
286 <#list images.getSiblings() as cur_Image>
287 <#if cur_Image.getData()?? && cur_Image.getData() != "">
288 <#if (cur_Image.getAttribute("alt")?length > 0)>
289 <#assign title = cur_Image.getAttribute("alt")>
290 <#else>
291 <#assign title = "">
292 </#if>
293 <div class = "col-md-12">
294 <div class="frame">
295 <div>
296 <a href="${cur_Image.getData()}" class="gallery hover-scale hover-grayscale" title="${title}" >
297 <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;">
298 </div>
299 </a>
300 </div>
301 </div>
302 </div>
303 </#if>
304
305 <#if cur_Image.getChild("YoutubeVideoId")?? >
306 <#assign youtubeId = cur_Image.getChild("YoutubeVideoId") >
307 <#assign hasYoutubeId = youtubeId?has_content && youtubeId.getData()?? && youtubeId.getData() != "" >
308 <#if hasYoutubeId>
309 <div class="frame youtube aspect-ratio aspect-ratio-16-to-9">
310 <iframe class="absolute-fill-parent" src="https://www.youtube.com/embed/${youtubeId.getData()}?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
311 </div>
312 </#if>
313 </#if>
314 </#list>
315
316 <#else>
317 <#if hasRepeatables(images)>
318 <#list images.getSiblings() as cur_Image>
319 <#if cur_Image.getData()?? && cur_Image.getData() != "">
320 <#if (cur_Image.getAttribute("alt")?length > 0)>
321 <#assign title = cur_Image.getAttribute("alt")>
322 <#else>
323 <#assign title = "">
324 </#if>
325 </#if>
326
327 <div class = "col-md-6 col-xs-12">
328 <div class="frame">
329 <div class>
330 <a href="${cur_Image.getData()}" class="gallery hover-scale hover-grayscale" title="${title}">
331
332 <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()});">
333 </div>
334 </a>
335 </div>
336 </div>
337 </div>
338 </#list>
339 </#if>
340 </#if>
341 </#if>
342</#macro>
343
344<#macro mainImageMacro>
345 <#if (entryDescription?length > 0)>
346 <#if mainImage.getData()?? && mainImage.getData() != "">
347 <#if (mainImage.getAttribute("alt")?length > 0)>
348 <#assign title = mainImage.getAttribute("alt")>
349 <#else>
350 <#assign title = "">
351 </#if>
352 <div class="col-md-8">
353 <div class="summary__description">
354 ${entryDescription}
355 </div>
356 </div>
357 <div class="col-md-4">
358 <div class="frame">
359 <a href="${mainImage.getData()}" class="gallery hover-scale hover-grayscale" title="${title}">
360 <img class="responsive-image full-width hover-scale-target hover-grayscale-target-60 summary__image" alt="${mainImage.getAttribute("alt")}" src="${mainImage.getData()}" />
361 </a>
362 </div>
363 </div>
364 <#else>
365 <div class="col-lg-12">
366 <div class="summary__description">
367 ${entryDescription}
368 </div>
369 </div>
370 </#if>
371 <#else>
372 <#if mainImage.getData()?? && mainImage.getData() != "">
373 <#if (mainImage.getAttribute("alt")?length > 0)>
374 <#assign title = mainImage.getAttribute("alt")>
375 <#else>
376 <#assign title = "">
377 </#if>
378 <div class="col-lg-12">
379 <div class="frame">
380 <a href="${mainImage.getData()}" class="gallery hover-scale hover-grayscale" title="${title}">
381 <img class="responsive-image full-width hover-scale-target hover-grayscale-target-60 summary__image" alt="${mainImage.getAttribute("alt")}" src="${mainImage.getData()}" />
382 </a>
383 </div>
384 </div>
385 </#if>
386 </#if>
387</#macro>
388
389
390<#macro obtainContactInfo repeatableField>
391 <#if hasRepeatables(repeatableField)>
392 <#list repeatableField.getSiblings() as contact>
393 <#if contact.getChild("contactDepartment").getData()?? && contact.getChild("contactDepartment").getData() != "">
394 <#assign contactDepartment = contact.getChild("contactDepartment").getData()>
395 <#else>
396 <#assign contactDepartment = "">
397 </#if>
398 <#if contact.getChild("contactProject").getData()?? && contact.getChild("contactProject").getData() != "">
399 <#assign contactProject = contact.getChild("contactProject").getData()>
400 <#else>
401 <#assign contactProject = "">
402 </#if>
403 <#if contact.getChild("contactName").getData()?? && contact.getChild("contactName").getData() != "">
404 <#assign contactName = contact.getChild("contactName").getData()>
405 <#else>
406 <#assign contactName = "">
407 </#if>
408 <#if contact.getChild("contactPhone").getData()?? && contact.getChild("contactPhone").getData() != "">
409 <#assign contactPhone = contact.getChild("contactPhone").getData()>
410 <#else>
411 <#assign contactPhone = "">
412 </#if>
413 <#if contact.getChild("contactEmail")?? && contact.getChild("contactEmail").getData() != "">
414 <#assign contactEmail = contact.getChild("contactEmail").getData()>
415 <#else>
416 <#assign contactEmail = "">
417 </#if>
418
419 <span class="contact__item <@getContactMargin contact?index/>">
420 <div>
421 <strong>${contactDepartment}</strong>
422 </div>
423 <div>
424 <strong>${contactProject}</strong>
425 </div>
426 <div>
427 <strong>${contactName}</strong>
428 </div>
429 <div>
430 ${contactPhone}
431 </div>
432 <div>
433 <a href="mailto:${contactEmail}">
434 ${contactEmail}
435 </a>
436 </div>
437 </span>
438 </#list>
439
440 </#if>
441</#macro>
442
443<#function hasRepeatables repeatableField>
444 <#if repeatableField.getSiblings()?has_content>
445 <#return true>
446 <#else>
447 <#return false>
448 </#if>
449
450</#function>
451
452<#macro getContactMargin index>
453 <#if index % 2 == 0>
454 contact__item--left
455 <#else>
456 contact__item--right
457 </#if>
458</#macro>
459
460
461
462
463<script>
464
465
466AUI().ready(function() {
467 $('.gallery').magnificPopup({
468 type:'image',
469 closeOnContentClick: false,
470 closeBtnInside: false,
471 mainClass: 'mfp-with-zoom mfp-img-mobile',
472 image: {
473 verticalFit: true,
474 titleSrc: function(item) {
475 var html = $.parseHTML( item.el.attr('title') );
476 return html;
477 }
478 },
479 gallery: {
480 enabled: true
481 }
482
483 });
484 /*var validDate = Base22.translationsJSON.${locale}.${modifiedDateMonth} + " " + ${modifiedDateDay} + "," + " " + ${modifiedDateYear} + " " +document.getElementById("validLanguageDate").innerText;
485 document.getElementById("validLanguageDate").innerHTML = "<p>" + validDate + "</p>"*/
486
487});
488
489</script>
490
491<#-- content group category -->
492<#assign groupId=themeDisplay.getScopeGroupId() ?number>
493<#assign assetVocabularyLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
494<#assign categoryLocalService=serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
495<#assign portletLocalService=serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService") />
496<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
497<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
498
499<#assign urlTitle = themeDisplay.getURLCurrent()/>
500<#assign beginIndex = themeDisplay.getURLCurrent()?last_index_of("/")+1 />
501<#assign endIndex = urlTitle?index_of("?fbclid")-1/>
502<!-- Removes facebook tracking code that is added when a PR is open from a link on facebook's website -->
503<#if endIndex gt -1>
504 <#assign urlTitle = urlTitle[beginIndex..endIndex]/>
505<#else>
506 <#assign urlTitle=themeDisplay.getURLCurrent()?substring(themeDisplay.getURLCurrent()?last_index_of("/")+1) />
507</#if>
508
509<#assign parentVocabularyName="Content Groups (GA4)">
510<#assign parentVocabulary= assetVocabularyLocalService.getGroupVocabulary(groupId,parentVocabularyName) />
511<#assign childCategories=categoryLocalService.getVocabularyCategories(parentVocabulary.getVocabularyId(),-1,-1,null)>
512
513<#assign finalCategories="" />
514<#assign articleCategories=[]>
515
516<#assign journalArticle=journalArticleLocalService.getArticleByUrlTitle(groupId,urlTitle) >
517<#assign assetEntry=assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle",journalArticle.getResourcePrimKey()) />
518<#assign articleCategories=assetEntry.getCategories() />
519
520<#list childCategories as category>
521 <#list articleCategories as articleCategory>
522 <#if category.getName() == articleCategory.getName()>
523 <#if finalCategories?has_content>
524 <#assign finalCategories = finalCategories + ", "+(articleCategory.getName()) />
525 <#else>
526 <#assign finalCategories=articleCategory.getName() >
527 </#if>
528
529 </#if>
530 </#list>
531</#list>
532
533<script>
534 var contentGroupElement = $("#content_group");
535
536 if(location.pathname.includes("/-/")) {
537 if(contentGroupElement.length !== 0) contentGroupElement.val("");
538 }
539
540 if("${finalCategories}" !== ""){
541 var elementValue = "${finalCategories}"
542 if(contentGroupElement.length === 0) $("body").append('<input type="hidden" id="content_group" name="content_group" value="'+elementValue+'">')
543 else contentGroupElement.val(elementValue)
544 }
545</script>
546<#-- End content group category -->