Archivio notizie
Tutte le novità e le attività del comitato di quartiere
An error occurred while processing the template.
The following has evaluated to null or missing: ==> portletPreferences['queryValues0'] [in template "20096#20121#609310" at line 39, column 37] ---- Tip: It's the final [] step that caused this error, not those before it. ---- 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: #assign categoriesConfig = portletPre... [in template "20096#20121#609310" at line 39, column 9] ----
1<#assign error = false />
2<#assign errorMessage = "" />
3
4<#assign structureService = serviceLocator.findService("it.inera.structure.service.StructureService")>
5<#assign siteBaseUrl = structureService.getSiteBaseUrl(themeDisplay)>
6<#assign jac = serviceLocator.findService("it.inera.journalarticleconverter.service.JournalArticleConverter")>
7<#assign dlFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
8<#assign dlAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
9<#assign notiziaStructureId = structureService.getStructureNotiziaId()>
10<#assign tipiNotiziaVocabularyId = structureService.getVocabularyTipinotiziaId()>
11
12<#if entries?has_content>
13 <#list entries as curEntry>
14 <#assign assetRenderer = curEntry.getAssetRenderer()/>
15 <#if validator.isNotNull(assetRenderer)>
16 <#assign className = assetRenderer.getClassName() />
17 <#if className == "com.liferay.journal.model.JournalArticle">
18 <#assign ja = assetRenderer.getArticle() />
19 <#assign structureId = ja.getDDMStructureId() />
20 <#if structureId != notiziaStructureId>
21 <#assign error = true />
22 <#assign errorMessage = "Il template gestisce solo Web Content di tipo Notizia" />
23 </#if>
24 <#else>
25 <#assign error = true />
26 <#assign errorMessage = "Il template gestisce solo asset di tipo Web Content" />
27 </#if>
28 <#else>
29 <#assign error = true />
30 <#assign errorMessage = "Errore generico" />
31 </#if>
32 </#list>
33<#else>
34 <#assign error = true />
35 <#assign errorMessage = "Nessun contenuto selezionato" />
36</#if>
37
38<#if !error>
39 <#assign categoriesConfig = portletPreferences['queryValues0'] >
40 <#assign categoryConfig = "" >
41 <#if categoriesConfig?has_content>
42 <#assign categoryConfig = "/-/category_novita/" + categoriesConfig[0] >
43 </#if>
44
45 <section id="novita">
46 <div class="py-3">
47 <div class="container">
48 <div class="row pt-4 mt-lg-2 pb-lg-4">
49
50 <#list entries as curEntry>
51 <#assign assetRenderer = curEntry.getAssetRenderer()/>
52 <#assign ja = assetRenderer.getArticle() />
53 <#assign structureId = ja.getDDMStructureId() />
54 <#assign notizia = jac.getNotizia(ja) />
55 <#assign vocabularies = notizia.getCategories() />
56
57 <#assign urlTitle = notizia.getUrlTitle() />
58 <#assign titolo = notizia.getTitolo() />
59 <#assign displayDate = notizia.getData() />
60 <#assign sottotitolo = notizia.getAbstract_() />
61 <#assign immagineprincipale = notizia.getImmagineprincipale() >
62
63 <#if vocabularies?? && vocabularies?has_content >
64 <#list vocabularies as vocabularyId, categories>
65 <#if categories?? && categories?has_content && vocabularyId == tipiNotiziaVocabularyId >
66 <#list categories as category>
67 <#assign tipoNotizia = category.getTitle(locale) >
68 <#assign paginaTipoNotizia = category.getDescription(locale)?replace('<[^>]+>','','r') >
69 </#list>
70 </#if>
71 </#list>
72 </#if>
73
74 <div class="col-12 col-md-6 col-lg-4">
75 <div class="card-wrapper">
76 <div class="card card-img no-after rounded border <#if immagineprincipale?? && immagineprincipale.getImmagine()?? && immagineprincipale.getImmagine().getUrl()?? && immagineprincipale.getImmagine().getUrl()?has_content>sm-row</#if>">
77 <#if immagineprincipale?? && immagineprincipale.getImmagine()?? && immagineprincipale.getImmagine().getUrl()?? && immagineprincipale.getImmagine().getUrl()?has_content>
78 <div class="img-responsive-wrapper">
79 <div class="img-responsive img-responsive-panoramic">
80 <#assign fileEntryImg = dlFileEntryService.getDLFileEntry(immagineprincipale.getImmagine().getFileEntryId()?number) />
81 <#assign fileVersionImg = dlAppLocalService.getFileVersion(fileEntryImg.getFileVersion().getFileVersionId()) />
82 <figure class="img-wrapper">
83 <#assign titoloImmagine = "Immagine principale"/>
84 <#if immagineprincipale.getTitolo()?? && immagineprincipale.getTitolo()?has_content>
85 <#assign titoloImmagine = immagineprincipale.getTitolo()/>
86 <#else>
87 <#assign titoloImmagine = immagineprincipale.getImmagine().getAlt()/>
88 </#if>
89 <@adaptive_media_image.img fileVersion=fileVersionImg title="${titoloImmagine}" alt="${immagineprincipale.getImmagine().getAlt()}" />
90 </figure>
91 </div>
92 </div>
93 </#if>
94
95 <div class="card-body p-4">
96 <div class="category-top">
97 <a title="${tipoNotizia}" class="text-decoration-none fw-semibold" href="${paginaTipoNotizia}" data-element="news-category-link" >${tipoNotizia}</a>
98 <span class="data text-secondary">${displayDate?string["dd/MM/yyyy"]}</span>
99 </div>
100 <h3 class="mb-0">
101 <a href="${siteBaseUrl}/-/${urlTitle}" class="text-decoration-none" data-element="news-link">
102 ${titolo}
103 </a>
104 </h3>
105 <p class="pt-3 text-secondary">${sottotitolo}</p>
106 </div>
107 </div>
108 </div>
109 </div>
110 </#list>
111
112 </div>
113
114 </div>
115 </div>
116 </section>
117<#else>
118 <section id="news">
119 <div class="section section-muted pb-90 pb-lg-50 px-lg-5 pt-0">
120 <div class="container">
121 <div class="row g-4">
122 <i>${errorMessage}</i>
123 </div>
124 </div>
125 </div>
126 </section>
127</#if>