CEMEX te cuenta
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing: ==> assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) [in template "20116#20152#55896363" at line 313, column 70] ---- 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: viewURL = (assetLinkBehavior != "show... [in template "20116#20152#55896363" in function "viewUrl" at line 313, column 14] - Reached through: #assign-container [in template "20116#20152#55896363" in function "viewUrl" at line 312, column 5] - Reached through: #assign entryViewURL = viewUrl(entry) [in template "20116#20152#55896363" at line 156, column 25] ----
1<#assign liferay_ui = taglibLiferayHash["/META-INF/liferay-ui.tld"] />
2 <#assign portletDisplay = themeDisplay.getPortletDisplay() />
3 <#assign navbarIdPortlet = "p_p_id_" + portletDisplay.getId() + "_"/>
4 <#assign navbarId = "navbar_" + portletDisplay.getId() />
5 <style>
6 .wo-content {
7 display: flex;
8 justify-content: center;
9 min-height: 100px;
10}
11 @media screen and (min-width: 1024px) {
12 .b-item-card {
13 margin-right:22px;
14 }
15 }
16
17 .b-item-card {
18 margin-bottom: 20px;
19 border: 1px solid #ccc;
20 }
21
22 .b-item-card .b-item-card__image {
23 border-bottom: 1px solid #ccc;
24 }
25
26 .b-item-card .b-item-card__image>img {
27 width: 100%;
28 min-height: 280px;
29 max-height: 280px;
30 }
31
32 .b-item-card .b-item-card__image .b-item-card__image-background {
33 width: 100%;
34 height: 280px;
35 position: relative;
36 background-repeat: no-repeat;
37 background-position: center;
38 background-size: cover;
39 }
40
41 .b-item-card .b-item-card__info {
42 padding: 20px;
43 }
44
45 .b-item-card__publish-date, .b-item-card__category {
46 font-size: 12px;
47 text-align: left;
48 color: #5a5d66;
49 }
50
51 .b-item-card__category {
52 font-weight: bold;
53 }
54
55 .b-item-card__summary {
56 font-size: 16px;
57 line-height: 1.5;
58 text-align: left;
59 padding-top: 20px;
60 height: 136px;
61 overflow: hidden;
62 margin-bottom: 20px;
63 padding-bottom: 0 !important;
64 }
65
66 .b-button-link {
67 display: inline-block;
68 }
69
70 .b-separator {
71 background-color: #5a5d66;
72 display: inline-block;
73 width: 1px;
74 height: 11px;
75 margin: 0 3px;
76 margin-bottom: -1px;
77 }
78
79 .b-edit-content {
80 float: right;
81 font-size: 14px;
82 margin-top: 4px;
83 color: #ccc;
84 }
85
86 .b-edit-content:hover {
87 color: #45474E;
88 }
89
90 .b-item-card__icon {
91 height: 275px;
92 width: 100%;
93 display: inline-block;
94 align-items: center;
95 }
96
97 .b-item-card__icon--center {
98 margin-top: 14%;
99 margin-left: 37%;
100 }
101
102 @media screen and (max-width: 1200px) {
103 .b-item-card__icon--center {
104 margin-top:40%;
105 }
106 }
107
108 @media screen and (max-width: 1024px) {
109 .b-item-card__icon--center {
110 margin-left: 46%;
111 margin-top: 18%;
112 }
113 }
114
115 @media screen and (max-width: 768px) {
116 .b-item-card__icon--center {
117 margin-left: 43%;
118 margin-top: 28%;
119 }
120 }
121
122 .b-item-card__icon-ficha-tecnica {
123 background-position: -401px -665px;
124 width: 100px;
125 height: 152px;
126 }
127
128 .b-item-card__icon-img {
129 background-position: -255px -665px;
130 width: 100px;
131 height: 152px;
132 }
133 </style>
134 <#if entries?has_content>
135 <div class="b-communicated">
136 <div class="container">
137 <div class="row">
138 <!-- start item loop -->
139 <#list entries as entry>
140 <#assign renderer = entry.getAssetRenderer()>
141 <#assign className = renderer.getClassName() >
142 <#assign classPK = renderer.getClassPK() >
143 <#if className == "com.liferay.journal.model.JournalArticle" >
144 <#assign journalArticle = renderer.getArticle() >
145 <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) >
146
147 <!-- start item data -->
148 <#assign assetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"]>
149 <#assign OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"]>
150 <#assign categoriesOrderBy = OrderByComparatorFactoryUtil.create("AssetCategory", ["modifiedDate", false])>
151 <#assign categoryList=assetCategoryLocalServiceUtil.getCategories(className, classPK) >
152
153 <#assign entryCategory = [] />
154
155 <#--<#assign entryViewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry, true)/>-->
156 <#assign entryViewURL = viewUrl(entry) />
157 <#assign entryTitle = document.valueOf("//dynamic-element[@name='displayTitle']") />
158 <#--<#assign entryPublishDate = entry.getPublishDate() />-->
159 <#assign entryPublishDate = document.valueOf("//dynamic-element[@name='date']") />
160 <#assign entrySummary = entry.getDescription(locale) />
161 <#assign entryThumbnail = document.valueOf("//dynamic-element[@name='thumbnail']") />
162 <#assign entryAttachment = document.valueOf("//dynamic-element[@name='attachment']") />
163 <#-- First we get the node and the text -->
164 <#--getURL example: 53@public@112817-->
165 <#assign URLnode = document.selectSingleNode("//dynamic-element[@name='linkToPage']/dynamic-content") />
166 <#assign getURL = URLnode.getText() />
167 <#assign pageURL = "" />
168 <#--Then we have to split the url to get the Layout ID and the Group ID -->
169 <#if getURL?trim != "">
170 <#assign entryLayoutId = getURL?substring(0 , getURL?index_of("@")) />
171 <#assign splitedURL = getURL?keep_after("@") />
172 <#assign entryGroupId = splitedURL?substring(splitedURL?index_of("@") + 1) />
173
174 <#assign layoutLocalService = serviceLocator.findService('com.liferay.portal.kernel.service.LayoutLocalService') />
175 <#assign pageLayout = layoutLocalService.getLayout(entryGroupId?number, false, entryLayoutId?number) />
176 <#assign pageURL = pageLayout.getFriendlyURL() />
177 </#if>
178 <#-- end link to a page entry -->
179 <#assign baseURL = themeDisplay.getPortalURL() + (themeDisplay.getPortalURL()?trim?lower_case?index_of("cemexcolombia.com") != -1)?then('','/web/cemex-colombia') />
180 <#assign linkToPageOrUrl = ""/>
181 <#if pageURL != "">
182 <#assign linkToPageOrUrl = baseURL + pageURL/>
183 <#else>
184 <#assign linkToPageOrUrl = document.valueOf("//dynamic-element[@name='linkUrl']")!"" />
185 </#if>
186 <#if linkToPageOrUrl?? && linkToPageOrUrl?trim != "">
187 <#assign entryViewURL = linkToPageOrUrl/>
188 </#if>
189 <!-- end item data -->
190 <!-- start item html -->
191 <div class="col-xs-12 col-md-4">
192 <div class="b-item-card">
193 <#if entryThumbnail?? && entryThumbnail?trim != ''>
194 <div class="b-item-card__image">
195 <div class="b-item-card__image-background b-image-gradient" style="background-image: url(${entryThumbnail})"></div>
196 </div>
197 <#else>
198 <#if typeIcon?? && typeIcon == "Ficha Técnica">
199 <div class="b-item-card__image b-item-card__icon">
200 <div class="cemex-icons b-item-card__icon-img b-item-card__icon--center">
201 </div>
202 </div>
203 <#else>
204 <div class="b-item-card__image b-item-card__icon">
205 <div class="cemex-icons b-item-card__icon-ficha-tecnica b-item-card__icon--center">
206 </div>
207 </div>
208 </#if>
209 </#if>
210 <div class="b-item-card__info">
211 <#if entryPublishDate?? && entryPublishDate?trim != "">
212 <span class="b-item-card__publish-date"><@getPublishedDate entryPublishDate /></span>
213 <div class="b-separator"></div>
214 </#if>
215 <#if themeDisplay.isSignedIn()>
216 <a class="b-edit-content" href="<@getEntryEditURL />"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
217 </#if>
218 <#if entrySummary?? && entrySummary != "">
219 <p class="b-item-card__summary"><@cutString entrySummary 22/></p>
220 <#else>
221 <p class="b-item-card__summary"><@cutString entryTitle 22/></p>
222 </#if>
223 <#if entryAttachment?? && entryAttachment?trim != ''>
224 <a class="b-button-link" href="${entryAttachment}">
225 <span class="b-button-link__label"><@liferay.language key="translations.btn.see-more"/></span>
226 </a>
227 <#else>
228 <a class="b-button-link" href="${entryViewURL}">
229 <span class="b-button-link__label"><@liferay.language key="translations.btn.see-more"/></span>
230 </a>
231 </#if>
232 </div>
233 </div>
234 </div>
235 <!-- end item html -->
236
237 <#-- start macro -->
238 <#macro getPadding isLastItem>
239 <#if ! isLastItem>
240 padding-right
241 </#if>
242 </#macro>
243
244 <#macro cutString inputString numberOfWords>
245 <#assign words = inputString />
246 <span>
247 <#list words?split(' ') as word>
248 ${word}
249 <#if word?index == numberOfWords>
250 …
251 <#break>
252 </#if>
253 </#list>
254 </span>
255 </#macro>
256
257 <#macro getPublishedDate publishedDate>
258 <#assign dateUtil = staticUtil["com.liferay.portal.kernel.util.DateUtil"] />
259 <#assign formatedPublishedDate = dateUtil.parseDate("yyyy-MM-dd", publishedDate?trim, locale)>
260 <#assign originalLocale = locale>
261 <#setting locale = "es_ES">
262 ${formatedPublishedDate?string("d MMMM yyyy")}
263 <#setting locale = originalLocale>
264 </#macro>
265
266 <#macro getCategoryErrorMessage>
267 <div class="alert alert-danger">Error, the provided category doesn't exist, please create it as a new category</div>
268 </#macro>
269
270 <#macro getEntryEditURL>
271 <#if renderer.hasEditPermission(themeDisplay.getPermissionChecker())>
272 <#assign redirectURL = renderResponse.createRenderURL() />
273
274 ${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")}
275 ${redirectURL.setWindowState("pop_up")}
276
277 <#assign editPortletURL = renderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL) />
278
279 <#if validator.isNotNull(editPortletURL)>
280 <#assign entryEditURL = "javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + entryTitle + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" />
281 ${entryEditURL}
282 </#if>
283 </#if>
284 </#macro>
285 <#-- end macro -->
286
287 <!-- start functions -->
288 <#function getVocabularyIdByName categoryName>
289 <#assign categoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"] />
290 <#assign categoriesList = categoryLocalServiceUtil.getCategories() />
291 <#list categoriesList as categoryEntry>
292 <#if categoryEntry.getName() == categoryName>
293 <#return categoryEntry.getVocabularyId()>
294 <#break>
295 </#if>
296 </#list>
297 <#return "error category">
298 </#function>
299 <#-- end functions -->
300 </#if>
301 </#list>
302 <!-- end item loop -->
303 </div>
304 </div>
305 </div>
306 <#else>
307 <div class="wo-content">
308 <h3>Por ahora no tenemos contenido para esta categoría</h3>
309 </div>
310 </#if>
311<#function viewUrl entry>
312 <#assign assetRenderer = entry.getAssetRenderer()
313 viewURL = (assetLinkBehavior != "showFullContent")?then(assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL), assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry))
314 />
315 <#return viewURL >
316</#function>