Cataloage de produse

In aceasta sectiune poti gasi cataloagele generale cu produse built-in sau free-standing, pentru descarcare si vizualizare convenabila offline.

O eroare a apărut în timpul procesării șablonului.
Error on line 23, column 33 in 10154#10194#51470
stringUtil.extractLast(document?string,'/') is undefined.
It cannot be assigned to fileEntryUuid
1<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService")> 
2 
3<div class="download-cataloghi"> 
4	<#assign count = 0> 
5	<#assign limit = 1> 
6 
7	<#if entries?has_content> 
8 
9		<#list entries as entry> 
10		 
11		 
12			<#if entry.getClassNameId() == portalUtil.getClassNameId("com.liferay.portlet.journal.model.JournalArticle")>   
13			    <#assign renderer = entry.getAssetRenderer()> 
14		        <#assign categories = entry.getCategories()> 
15		       
16		    	<#assign journalArticle = renderer.getArticle()> 		    
17		    	<#assign docXml = saxReaderUtil.read(journalArticle.getContent())> 
18		    	<#assign image = docXml.valueOf("//dynamic-element[@name='image']/dynamic-content[@language-id='${locale}']/text()") /> 
19		    	<#assign altImage = docXml.valueOf("//dynamic-element[@name='altImage']/dynamic-content[@language-id='${locale}']/text()") /> 
20		    	<#assign document = docXml.valueOf("//dynamic-element[@name='document']/dynamic-content[@language-id='${locale}']/text()") /> 
21			    <#assign dataIco = docXml.valueOf("//dynamic-element[@name='dataIco']/dynamic-content[@language-id='${locale}']/text()") /> 
22				 
23				<#assign fileEntryUuid = stringUtil.extractLast(document?string,'/')> 
24				<#assign fileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(fileEntryUuid?string , themeDisplay.getSiteGroupId())> 
25 
26				<#assign exstension = fileEntry.getExtension()> 
27				<#assign dimension = (fileEntry.getSize())/1000000> 
28				 
29 
30				<#if (count?number &gt; limit?number)> 
31					<#if count?number == 2 > 
32						<ul class="elenco-cataloghi"> 
33					</#if> 
34					<#if validator.isNotNull(dataIco) && validator.isNotNull(document)> 
35							<li class="catalogo" data-ico="${dataIco}"> 
36								<div class="inner"> 
37									<div class="detail"> 
38										<h2> 
39											<a href="${document}">${entry.getTitle(locale)}</a> 
40										</h2> 
41					 
42										<p> 
43											<a href="${document}">${entry.getSummary(locale, true)}</a> 
44										</p> 
45									</div> 
46								</div> 
47							</li> 
48						<#if count == (entries?size)>	 
49							</ul> 
50						</#if>	 
51					</#if>		 
52						 
53					<#assign count = count?number + 1> 
54					 
55				<#else> 
56					<#if count?number == 0 > 
57						<div class="cataloghi-generali"> 
58					</#if>	 
59					<div class="box-catalogo"> 
60							<div class="inner"> 
61								<#if validator.isNotNull(image)> 
62									<#if validator.isNotNull(altImage)> 
63										<div class="left"> 
64											<img alt="${altImage}" src="${image}" /> 
65										</div> 
66									<#else> 
67										<div class="left"> 
68											<img src="${image}" /> 
69										</div> 
70									</#if>	 
71								</#if> 
72								<div class="right"> 
73									<h2>${entry.getTitle(locale)}</h2> 
74				 
75									<p>${entry.getSummary(locale, true)}</p> 
76									 
77									<#if validator.isNotNull(document)> 
78										<a href="${document}"><span><@liferay.language key="download" /></span><span class="small">${exstension} (${dimension?string["0.#"]} MB)</span> 
79										</a> 
80									</#if>		 
81									 
82								</div> 
83							</div> 
84						<#if count?number == 1>	 
85							</div> 
86						</#if>			 
87						<#assign count = count?number + 1> 
88					</div>	 
89				</#if>	 
90			</#if> 
91		</#list> 
92	</#if> 
93</div>