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 24, 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 rel = ADTUtils.getRelAttribute(themeDisplay, document) /> 
22			    <#assign dataIco = docXml.valueOf("//dynamic-element[@name='dataIco']/dynamic-content[@language-id='${locale}']/text()") /> 
23				 
24				<#assign fileEntryUuid = stringUtil.extractLast(document?string,'/')> 
25                 
26                <#assign exstension = ""/> 
27				<#assign dimension = "" /> 
28				 
29				<#attempt> 
30      				<#assign fileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(fileEntryUuid?string , themeDisplay.getSiteGroupId())> 
31       
32      				<#assign exstension = fileEntry.getExtension()> 
33      				<#assign dimension = (fileEntry.getSize())/1000000> 
34  				 
35  			    <#recover> 
36                </#attempt> 
37				 
38 
39				<#if (count?number &gt; limit?number)> 
40					<#if count?number == 2 > 
41						<ul class="elenco-cataloghi"> 
42					</#if> 
43					<#if validator.isNotNull(dataIco) && validator.isNotNull(document)> 
44							<li class="catalogo" data-ico="${dataIco}"> 
45								<div class="inner"> 
46									<div class="detail"> 
47										<h2> 
48											<a href="${document}" ${rel}>${entry.getTitle(locale)}</a> 
49										</h2> 
50					 
51										<p> 
52											<a href="${document}" ${rel}>${entry.getSummary(locale, true)}</a> 
53										</p> 
54									</div> 
55								</div> 
56							</li> 
57						<#if count == (entries?size)>	 
58							</ul> 
59						</#if>	 
60					</#if>		 
61						 
62					<#assign count = count?number + 1> 
63					 
64				<#else> 
65					<#if count?number == 0 > 
66						<div class="cataloghi-generali"> 
67					</#if>	 
68					<div class="box-catalogo"> 
69							<div class="inner"> 
70								<#if validator.isNotNull(image)> 
71									<#if validator.isNotNull(altImage)> 
72										<div class="left"> 
73											<img alt="${altImage}" src="${image}" /> 
74										</div> 
75									<#else> 
76										<div class="left"> 
77											<img src="${image}" /> 
78										</div> 
79									</#if>	 
80								</#if> 
81								<div class="right"> 
82									<h2>${entry.getTitle(locale)}</h2> 
83				 
84									<p>${entry.getSummary(locale, true)}</p> 
85									 
86									<#if validator.isNotNull(document)> 
87										<a href="${document}" ${rel}><span><@liferay.language key="candy-download" /></span><span class="small">${exstension} (${dimension?string["0.#"]} MB)</span> 
88										</a> 
89									</#if>		 
90									 
91								</div> 
92							</div> 
93						<#if count?number == 1>	 
94							</div> 
95						</#if>			 
96						<#assign count = count?number + 1> 
97					</div>	 
98				</#if>	 
99			</#if> 
100		</#list> 
101	</#if> 
102</div>