News & Media | Marche Multiservizi - Marche Multiservizi
Si è verificato un errore nell'elaborarazione del modello.
Java method "static it.reply.open.hera.template.custom.service.WidgetTemplateTool.getDateFormattedBy(String, String, Locale)" threw an exception; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: contentDate = hera_template_tool.getD... [in template "20096#20122#1419843" at line 92, column 13] ----
1<#assign
2assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")
3layoutLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")
4vocabularyComunicatiStampa = assetVocabularyLocalServiceUtil.fetchGroupVocabulary(themeDisplay.getScopeGroupId(), "MMSNews")
5vocabularyId = vocabularyComunicatiStampa.vocabularyId
6/>
7
8
9<#assign
10companyId=themeDisplay.getCompanyId()
11languageId=themeDisplay.getLanguageId()
12currentUrl=themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()
13url=portalUtil.getPortalURL(themeDisplay)
14HERA_FIELD_TITLE="title_" + languageId
15HERA_FIELD_LOCALIZED_TITLE="localized_title_" + languageId
16HERA_FIELD_SIMPLE_TITLE="title"
17HERA_FIELD_URL_TITLE="urlTitle"
18HERA_FIELD_CONTENT="content_" + languageId
19HERA_FIELD_DESCRIPTION="description"
20HERA_FIELD_DESCRIPTION_IT="description_" + languageId
21HERA_FIELD_PUBLISH_DATE="publishDate"
22HERA_FIELD_DISPLAYDATE="displayDate"
23HERA_FIELD_CREATEDATE="createDate"
24HERA_FIELD_CLASS_TYPE_ID="classTypeId"
25HERA_FIELD_ENTRY_CLASS_NAME="entryClassName"
26HERA_FIELD_CLASSPK="entryClassPK"
27HERA_FIELD_ENTRY_CLASS_NAME_LAYOUT="com.liferay.portal.kernel.model.Layout"
28HERA_FIELD_ENTRY_CLASS_NAME_JA="com.liferay.journal.model.JournalArticle"
29HERA_FIELD_ENTRY_CLASS_NAME_DFE="com.liferay.document.library.kernel.model.DLFileEntry"
30HERA_FIELD_ENTRY_CLASS_NAME_USER="com.liferay.portal.kernel.model.User"
31HERA_FIELD_ENTRY_CLASS_NAME_FOLDER="com.liferay.document.library.kernel.model.DLFolder"
32HERA_FIELD_ENTRY_CLASS_NAME_DDLRECORD="com.liferay.dynamic.data.lists.model.DDLRecord"
33HERA_FIELD_ENTRY_CLASS_NAME_DDMFORMINSTANCERECORD="com.liferay.dynamic.data.mapping.model.DDMFormInstanceRecord"
34HERA_FIELD_PREFIX="ddm__keyword__"
35HERA_FIELD_PREFIX_TEXT="ddm__text__"
36HERA_FIELD_TITOLO="__title_"
37HERA_FIELD_SOTTOTITOLO="__description_"
38HERA_FIELD_IMMAGINE="__image_"
39HERA_FIELD_LINK_HREF="__linkHref_"
40HERA_ASSET_CATEGORY_TITLE="assetCategoryTitles"
41HERA_FIELD_USER_FULLNAME="fullName"
42HERA_FIELD_USER_EMAIL_ADDRESS="emailAddress"
43HERA_ORA_PUBBLICAZIONE="__dataPubblicazione_"
44CATEGORY_HERA_SPA=languageUtil.get(locale, "hera-spa")
45CATEGORY_IR_PRICE=languageUtil.get(locale, "ir-price")
46/>
47
48
49<#-- gruppohera_results.jsp es. ddm__keyword__54911__sottotitolo_it_IT es. displayDate -->
50
51<#-- Abilitare o Disabilitare Highlight dei termini ricercati in configurazione -->
52<#assign isHighlightEnabled=true />
53<#if portletPreferences["highlightEnabled"]?? && portletPreferences["highlightEnabled"][0]?has_content>
54 <#assign isHighlightEnabled=portletPreferences["highlightEnabled"][0] />
55</#if>
56
57<#assign docs=searchContainer.getResults() />
58<div class="container">
59 <div class="row">
60 <div class="search-total-label col-12">
61 <#if searchResultsPortletDisplayContext.getKeywords()?has_content>
62 <#if searchContainer.getTotal() == 1>
63 ${languageUtil.format(locale, "x-result-for-x", [searchContainer.getTotal(), "<strong>" +
64 htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()) + "</strong>"], false)}
65 <#else>
66 ${languageUtil.format(locale, "x-results-for-x", [searchContainer.getTotal(), "<strong>" +
67 htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()) + "</strong>"], false)}
68 </#if>
69
70 <#else>
71 ${searchContainer.getTotal()} Risultati
72 </#if>
73 </div>
74 </div>
75</div>
76
77<div class="container archivio my-4">
78 <#if docs?has_content>
79 <#list docs as d>
80
81
82 <#assign
83 classTypeId=d.get(HERA_FIELD_CLASS_TYPE_ID)
84
85 contentTitle=d.get(HERA_FIELD_PREFIX + classTypeId + HERA_FIELD_TITOLO + languageId)
86 sottotitolo=d.get(HERA_FIELD_PREFIX + classTypeId + HERA_FIELD_SOTTOTITOLO + languageId)
87 description=d.get(HERA_FIELD_DESCRIPTION_IT)
88 immagineInEvidenza=d.get(HERA_FIELD_PREFIX_TEXT+classTypeId + HERA_FIELD_IMMAGINE + languageId)
89 linkHref=d.get(HERA_FIELD_PREFIX+classTypeId + HERA_FIELD_LINK_HREF + languageId)
90 urlTitle=d.get(HERA_FIELD_URL_TITLE)
91 contentSummary=hera_template_tool.highlight(sottotitolo, searchResultsPortletDisplayContext.getKeywords(), isHighlightEnabled?boolean)
92 contentDate=hera_template_tool.getDateFormattedBy(d.get(HERA_FIELD_DISPLAYDATE),"dd/MM/yyyy",locale)
93 publishDate=hera_template_tool.getDateFormattedBy(d.get(HERA_FIELD_PUBLISH_DATE),"dd/MM/yyyy",locale)
94 oraPubblicazione = d.get(HERA_FIELD_PREFIX +classTypeId + HERA_ORA_PUBBLICAZIONE + languageId)
95 oraPubblicazioneObj = oraPubblicazione
96 checkcategory=0
97 contentUrl=hera_template_tool.getSearchResultViewURL(renderRequest, renderResponse,
98 d.get(HERA_FIELD_ENTRY_CLASS_NAME), d.get(HERA_FIELD_CLASSPK)?number, true, currentUrl)
99 content=d.get(HERA_FIELD_CONTENT) titlepage=languageUtil.get(locale, titlepage,layout.getName(locale))
100
101 />
102
103 <#attempt>
104 <#assign immagineInEvidenzaObj=immagineInEvidenza?eval />
105 <#recover>
106 <#assign immagineInEvidenzaObj="" />
107 </#attempt>
108
109 <#attempt>
110 <#assign
111 redirectLayoutUrl = hera_template_tool.getFriendlyURLFromLinkHref(linkHref)
112 />
113 <#recover>
114 <#assign
115 redirectLayoutUrl = ""
116 />
117 </#attempt>
118
119 <div class="post-item mb-4">
120 <a href="${redirectLayoutUrl}" class="position-relative white-bg">
121 <#if immagineInEvidenzaObj?? && immagineInEvidenzaObj?has_content>
122 <div class="cardNews cardNewsTrigger">
123 <#else>
124 <div class="cardNews cardNewsTrigger">
125 </#if>
126 <#if immagineInEvidenzaObj?? && immagineInEvidenzaObj?has_content>
127 <#assign immagineUrl="/documents/" + immagineInEvidenzaObj.groupId + "/0/" + immagineInEvidenzaObj.name + "/" + immagineInEvidenzaObj.uuid />
128 <div class="cardNews__imageContainer">
129 <img title="${immagineInEvidenzaObj.name}" alt="${titlepage}" class="agg-tile-image" src="${immagineUrl}" />
130 </div>
131 <div class="post-link-block">
132 <div class="container px-lg-3 pr-xl-4">
133 <div class="black py-2 small">
134 <div class="mr-0 mr-md-5 d-inline">
135 <#attempt>
136 ${contentDate}
137 <#recover>
138 </#attempt>
139 </div>
140 <#assign assetCategoryList= hera_template_tool.getAssetCategoryList(d.get("rootEntryClassPK"))/>
141 <#list assetCategoryList as entryCategory>
142 <#if entryCategory.vocabularyId == vocabularyId>
143 <#assign catName = entryCategory.name>
144 <#if catName==CATEGORY_HERA_SPA>
145 <#assign checkcategory=1 />
146 </#if>
147 <#if catName==CATEGORY_IR_PRICE>
148 <#assign checkcategory=1 />
149 </#if>
150
151 <div class="mr-2 d-inline gruppo-color-bg white px-1 py-0 py-lg-1 py-md-1 ${catName?lower_case}">
152 ${catName}
153 </div>
154 </#if>
155 </#list>
156 </div>
157
158 <h3 class="titlesize bigger black letter-spacing-sm bolder"> ${contentTitle}</h3>
159 <#if contentSummary?? && contentSummary?has_content>
160 <div class="d-none d-lg-block greyish-brown tilesize"> ${contentSummary} </div>
161 <#else>
162 <div class="d-none d-lg-block greyish-brown tilesize">
163 ${description}
164 </div>
165 </#if>
166 <#if checkcategory==1>
167 <i class="black py-2 mr-0 mr-md-3">
168 <#if contentDate!=""> Online dal ${contentDate} </#if>
169 <#--<#list oraPubblicazioneObj as ora_pubb>-->
170 <#if oraPubblicazioneObj!="">
171 alle ore ${oraPubblicazioneObj}
172 </#if>
173 <#--</#list>-->
174
175 </i>
176 </#if>
177 </div>
178 </div>
179 <#else>
180 <div class="col-xs-12 col-md-10">
181 <div class="container">
182 <div class="ml-4 black py-2 small mr-3">
183 <div class="mr-5 d-inline">
184 ${contentDate}
185 </div>
186 <div class="mr-2 d-inline gruppo-color-bg white px-1 py-0 py-lg-1 py-md-1">
187 <#assign assetCategoryList= hera_template_tool.getAssetCategoryList(d.get("rootEntryClassPK"))/>
188 <#list assetCategoryList as entryCategory>
189
190 <#assign catName = entryCategory.name>
191 <div class="mr-2 d-inline gruppo-color-bg white px-1 py-0 py-lg-1 py-md-1">
192 ${catName}
193 </div>
194 </#list>
195 </div>
196 </div>
197 <h3 class="titlesize bigger ml-4 black letter-spacing-sm bolder"> ${contentTitle}</h3>
198 <#if contentSummary?? && contentSummary?has_content>
199 <div class="d-none d-lg-block black tilesize ml-4">
200 ${contentSummary}
201 </div>
202 <#else>
203 <div class="d-none d-lg-block greyish-brown tilesize ml-4">
204 ${description}
205 </div>
206 </#if>
207 <#if checkcategory==1>
208 <i class="ml-4 black py-2 small mr-3">
209 <#if contentDate!=""> Online dal ${contentDate} </#if>
210 <#--<#list oraPubblicazioneObj as ora_pubb>-->
211 <#if oraPubblicazioneObj!="">
212 alle ore ${oraPubblicazioneObj}
213 </#if>
214 <#--</#list>-->
215 </i>
216 </#if>
217 </div>
218 </div>
219 </#if>
220 </div>
221 </a>
222 </div>
223 </#list>
224 </#if>
225</div>
226
227
228<script>
229 $(document).ready(function () {
230 var url = window.location.href;
231 if (url.indexOf("/-/")>=0){
232 var recoverurl=localStorage.getItem("reindexcomunicati");
233 $(".reindexlink").attr("href",recoverurl);
234 }else{
235 localStorage.setItem("reindexcomunicati", url);
236 }
237 });
238</script>