An error occurred while processing the template.
The following has evaluated to null or missing: ==> stringUtil.shorten(htmlUtil.extractText(curEntry.getTitle(locale)),140) [in template "34012#34047#35003" at line 43, column 76] ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${stringUtil.shorten(htmlUtil.extract... [in template "34012#34047#35003" at line 43, column 74] ----
1<#assign assetPublisherTool = utilLocator.findUtil('lportal-ce-hook', 'as.asac.template.tools.AssetPublisherTool') />
2<#assign dlTool = utilLocator.findUtil('lportal-ce-hook', 'as.asac.template.tools.DLTool') />
3<#assign assetTool = utilLocator.findUtil('lportal-ce-hook', 'as.asac.template.tools.AssetTool') />
4
5<script src="${themeDisplay.getPathThemeJavaScript()}/needsharebutton/needsharebutton.js"></script>
6
7<#if entries?has_content>
8
9 <#assign key = "4" />
10 <#if cols?has_content && cols!="0">
11 <#assign key = cols />
12 </#if>
13 <#assign colsMap = {
14 "12": "col-12",
15 "6": "col-sm-6 col-12",
16 "4": "col-lg-4 col-md-6 col-sm-6 col-12",
17 "3": "col-lg-3 col-md-4 col-sm-6 col-12" } />
18
19 <#assign colsValue = colsMap[key]/>
20
21 <div class="template-abstract container p-0">
22 <div class="row">
23
24 <#assign thumbnailBannerUuid = themeDisplay.getLayoutSet().getSettingsProperty("banner")!""/>
25 <#assign thumbnailBanner=""/>
26 <#if thumbnailBannerUuid!="">
27 <#assign thumbnailBanner= dlTool.getPathByUuid(thumbnailBannerUuid, groupId)/>
28 </#if>
29
30 <#list entries as curEntry>
31
32 <#assign assetRenderer = curEntry.getAssetRenderer() />
33 <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) />
34 <#assign viewURL = assetPublisherTool.getAssetViewURL(renderRequest, renderResponse, curEntry) />
35 <#assign thumbnailPath = assetRenderer.getThumbnailPath(renderRequest)! />
36 <#assign thumbnail = dlTool.getThumbnail(thumbnailPath, "2", thumbnailBanner)! />
37 <#assign description = curEntry.getDescription(locale) />
38
39 <div class="${colsValue} col">
40
41 <div class="card card-box">
42 <span class="image-wrapper image-wrapper-cover" style="background-image: url('${thumbnail}');">
43 <img alt="Imaxe: ${stringUtil.shorten(htmlUtil.extractText(curEntry.getTitle(locale)),140)}" src="${thumbnail}">
44 </span>
45 <p class="card-row card-row-layout-fixed">
46
47 <span class="card-subtitle">
48 <span id="share-${curEntry.getEntryId()}" class="need-share-button-default"
49 data-share-icon-style="box"
50 data-share-networks="Mailto,Twitter,Pinterest,Facebook,Linkedin"
51 data-share-url="${htmlUtil.escape(viewURL)}"
52 data-share-title="${entryTitle}"><!--share--></span>
53 <script type="text/javascript">
54 new needShareDropdown(document.getElementById('share-${curEntry.getEntryId()}'));
55 </script>
56 </span>
57
58 <a href="${viewURL}" class="card-title">${curEntry.getTitle(locale)}</a>
59
60 <span class="card-metadata">
61 <span class="categories">${assetTool.getCategoriesMarkup(curEntry, "span", "category", locale)}</span>
62 </span>
63
64 <#if validator.isNull(description)>
65 <#assign description = assetTool.getFieldValue(assetRenderer, "Descripcion") />
66 </#if>
67 <#if validator.isNotNull(description)>
68 <span class="card-text">${stringUtil.shorten(htmlUtil.extractText(description),150)}</span>
69 </#if>
70
71 <span class="lfr-meta-actions asset-actions">
72 <@getEditIcon />
73 </span>
74 </p>
75 </div>
76
77 </div>
78
79 </#list>
80 </div>
81 </div>
82 <#else>
83 <div class="portlet-msg-info">Por el momento no existen contenidos para esta sección</div>
84</#if>
85
86<#macro getEditIcon>
87 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
88 <#assign redirectURL = renderResponse.createRenderURL() />
89
90 ${redirectURL.setParameter("mvcPath", "/add_asset_redirect.jsp")}
91 ${redirectURL.setWindowState("pop_up")}
92
93 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" />
94
95 <#if validator.isNotNull(editPortletURL)>
96 <#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) />
97
98 <@liferay_ui["icon"]
99 cssClass="icon-monospaced visible-interaction"
100 icon="pencil"
101 markupView="lexicon"
102 message=title
103 url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});"
104 />
105 </#if>
106 </#if>
107</#macro>