Documenti - Provincia di Como
Documenti - Intro
Briciole di pane
Documenti
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Documenti e normative della Provincia di Como
Documenti e normative della Provincia di Como
Documenti visualizzati: 1
Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing: ==> DLFileEntryLocalService.fetchDLFileEntry(fileEntryId) [in template "20101#20127#CARD-DOWNLOAD-TMPL" at line 22, column 24] ---- Tip: If the failing expression is known to 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: file = DLFileEntryLocalService.fetchD... [in template "20101#20127#CARD-DOWNLOAD-TMPL" at line 22, column 17] ----
1<#assign fileData = fileToDownload.data/>
2<#assign pos1 = fileData?string?index_of("fileEntryId") />
3<#if (pos1>0)> <#--i file nuovi hanno fileEntryID, quelli vecchi classPK-->
4 <#assign pos1 = pos1+ 14/> <#--lunghezza parola fileEntryId e 3 di ":"-->
5 <#assign str = fileData?substring(pos1)/>
6 <#assign pos2 = str?index_of('"')/>
7 <#assign fileEntryId = str?substring(0,pos2)?replace(",","")?number/>
8<#else>
9 <#--alcuni file vecchi hanno il classPK come stringa, altri come numero quindi senza le virgolette -->
10 <#assign pos1 = fileData?string?index_of('classPK":') /> <#--lunghezza parola classPK e 3 di ":"-->
11 <#if (pos1>0)>
12 <#assign pos1 = pos1+ 9/> <#--lunghezza parola classPK e 3 di ":"-->
13 <#assign str = fileData?substring(pos1)?replace('"',"")/>
14 <#assign pos2 = str?index_of(',')/>
15 <#assign fileEntryId = str?substring(0,pos2)?number/>
16 </#if>
17</#if>
18
19
20<#assign images_folder = themeDisplay.getPathThemeImages() />
21<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")
22 file = DLFileEntryLocalService.fetchDLFileEntry(fileEntryId)
23 filesize = file.getSize()
24/>
25<#if filesize gt 0>
26 <#assign filesize = file.getSize() / 1000000 />
27</#if>
28<div class="card-wrapper card-space card-download">
29 <div class="card card-bg simple-card">
30 <a href="${fileToDownload.getData()}" download>
31 <div class="card-body">
32 <svg class="icon">
33 <use xlink:href="${images_folder}/sprite.svg#it-clip"> </use>
34 </svg>
35 <div class="text-container">
36 <h3>${documentName.getData()} (${filesize?string(",##0.00")} MB)</h3>
37 <p>${documentDescription.getData()}</p>
38 </div>
39 </div>
40 </a>
41 </div>
42</div>