…
Alla utbildningar
An error occurred while processing the template.
Expression entry.getAssetRenderer() is undefined on line 11, column 46 in 10154#10194#48155.
1<#--
2Application display templates can be used to modify the look of a
3specific application.
4
5Please use the left panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8<#assign counter=0/>
9<#if entries?has_content>
10 <#list entries as entry>
11 <#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContent()) />
12 <#assign Publicerad = docXml.valueOf("//dynamic-element[@name='Publiserad']/dynamic-content/text()") />
13 <#if getterUtil.getBoolean(Publicerad)>
14
15 <#if (counter>0)>
16 <div style="padding:7px;background-color:#EFEFEF">
17 <#else>
18 <div style="padding:7px;background-color:#FAFAFA">
19 </#if>
20 <#assign LayoutLocalService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") />
21 <#assign assetRenderer = entry.getAssetRenderer() />
22 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
23 <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
24 <#assign article= assetRenderer.getArticle() />
25 <#assign layoutuuid = article.getLayoutUuid() />
26
27 <#assign layout = LayoutLocalService.fetchLayoutByUuidAndCompanyId(layoutuuid,themeDisplay.getCompanyId()) />
28 <#assign url= layout.getFriendlyURL(locale) />
29 <a href="${url}">${article.getTitle(locale)}</a>
30
31 </div>
32
33 <#assign counter=counter+1/>
34
35 <#if (counter>1)>
36 <#assign counter=0/>
37 </#if>
38 </#if>
39 </#list>
40</#if>