HeaderArchivioNews

NEWS

Archivio news (2020-2014)

Publicador de contenidos

Superbonus, in allarme i professionisti tecnici

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> .vars['reserved-article-display-date']  [in template "20115#20151#112942" at line 5, column 21]

----
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 dataPub = .vars["reserved-art...  [in template "20115#20151#112942" at line 5, column 2]
----
1<!-- DETTAGLIO NEWS --> 
2 
3<#-- RECUPERO DATI --> 
4 
5 <#assign dataPub = .vars['reserved-article-display-date'].data /> 
6    <#-- Save the original page locale for later --> 
7	<#assign originalLocale = .locale> 
8    <#-- Set the page locale to the portals default locale --> 
9	<#setting locale = localeUtil.getDefault()> 
10	<#-- Parse the date to a date object --> 
11	<#assign dataPub = dataPub?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
12	<#-- Set the page locale back to the original page locale --> 
13	<#-- Set the page locale back to the original page locale --> 
14	<#setting locale = originalLocale> 
15	<#assign currentUrl = themeDisplay.getURLCurrent()/> 
16    <#assign splitUrl = currentUrl?split("?") /> 
17    <#assign cleanedUrl = splitUrl[0] /> 
18    <#assign portalUrl = themeDisplay.getPortalURL() /> 
19		 
20<#-- FINE RECUPERO DATI --> 
21 
22 
23<!-- DettaglioNews  --> 
24 
25<main class="cng"> 
26  <section class="section  mt-5"> 
27        <div class="container"> 
28           
29<#assign DataNotizia_Data = getterUtil.getString(Ttiolo.DataNotizia.getData())> 
30 
31 
32  <div class="customTab col-lg-8" style="margin-top:0; padding-top: 0"> <!-- prima colonna --> 
33    <div class="subtitle mb-3"> 
34	 
35	<!-- 
36	<p class="mb-3"> 
37	--> 
38        				 
39			<!-- DA CONFIGURARE IN FONDAZIONE/MOTORE FREEMARKER --> 
40					<#assign AssetEntryLocalServiceUtil = objectUtil("com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil") /> 
41					 
42					<#-- assign assetService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetTagLocalService")  --> 
43					 
44					<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleService") /> 
45					 
46					<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(scopeGroupId), .vars['reserved-article-id'].data)> 
47 
48<#assign resourcePrimKey = article.getResourcePrimKey() /> 
49    
50   <#assign entry = AssetEntryLocalServiceUtil.getEntry("com.liferay.journal.model.JournalArticle", resourcePrimKey) /> 
51 
52<#assign tagName = "" /> 
53<#if entry?? && entry.getTags()?size != 0 > 
54<#assign tags = entry.getTags() />			 
55  <#list tags as tag> 
56 
57		<#assign tagName = tag.getName() /> 
58		 
59		 
60		 
61</#list>		 
62</#if>			 
63			 
64 
65					 
66					 
67					 
68				 
69					<#if NomeTag??> 
70						${NomeTag.getData()} 
71					<#else> 
72					 
73						<#if tagName?upper_case == "NEWS"> 
74					 
75							 
76							<a href="/notizie"  style="text-decoration: none;" class="btn-secondary tag-news mr-2">NOTIZIE 
77							 
78						<#else> 
79							 
80							<#if tagName?upper_case == "VIDEO"> 
81							 
82								<a href="/video-gallery" style="text-decoration: none;" class="btn-secondary tag-news  mr-2">VIDEO GALLERY 
83								 
84							<#else> 
85								<#if tagName?upper_case == "COMUNICATI STAMPA" || tagName?upper_case == "COMUNICATI"> 
86									<a href="/comunicati-stampa" style="text-decoration: none;" class="btn-secondary tag-news mr-2"> COMUNICATI STAMPA 
87								</#if> 
88								 
89							</#if> 
90						 
91						</#if> 
92					</#if> 
93					 
94					</a> 
95               
96<!-- 
97			  </p>   
98	--> 
99	 
100	 
101	<#if validator.isNotNull(DataNotizia_Data)> 
102	<#assign DataNotizia_DateObj = dateUtil.parseDate("yyyy-MM-dd", DataNotizia_Data, locale)> 
103 
104	${dateUtil.getDate(DataNotizia_DateObj, "dd/MM/yyyy", locale)} 
105 
106	 
107	<!--#else> 
108	${dataPub?string["dd/MM/yyyy"]}--> 
109	</#if> 
110	 
111 
112<div class="social-icons float-right"> 
113  <a href="https://www.facebook.com/sharer/sharer.php?u=${portalUrl}${currentUrl}" target="_blank" > 
114      <!-- i class="fab fa-facebook-square"></i --> 
115      <@clay["icon"] symbol="social-facebook" /> 
116  </a> 
117  <a href="https://twitter.com/intent/tweet?url=${portalUrl}${cleanedUrl}&text=${Ttiolo.getData()}" target="_blank"> 
118      <!-- i class="fab fa-twitter-square"></i --> 
119      <@clay["icon"] symbol="twitter-x" /> 
120  </a> 
121</div> 
122 
123	<!-- condividi toolbar --> 
124	   <!-- div class="addthis_inline_share_toolbox float-right" --> 
125	    
126	   <!-- PEZZOTTO AL MOMENTO COPIO IL TESTO DEL DIV CHE DOVREBBE ESSERE CREATO RUN_TIME  
127	    
128	   <div id="atstbx" class="at-resp-share-element at-style-responsive addthis-smartlayers addthis-animated at4-show" aria-labelledby="at-c8f47a8a-9dac-43c9-b98c-ba4e0c3b5b20" role="region"><span id="at-c8f47a8a-9dac-43c9-b98c-ba4e0c3b5b20" class="at4-visually-hidden">AddThis Sharing Buttons</span><div class="at-share-btn-elements"><a role="button" tabindex="0" class="at-icon-wrapper at-share-btn at-svc-facebook" style="background-color: #EC7C03; border-radius: 4px;"><span class="at4-visually-hidden">Share to Facebook</span><span class="at-icon-wrapper" style="line-height: 16px; height: 16px; width: 16px;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" version="1.1" role="img" aria-labelledby="at-svg-facebook-1" class="at-icon at-icon-facebook" style="fill: rgb(255, 255, 255); width: 16px; height: 16px;"><title id="at-svg-facebook-1">Facebook</title><g><path d="M22 5.16c-.406-.054-1.806-.16-3.43-.16-3.4 0-5.733 1.825-5.733 5.17v2.882H9v3.913h3.837V27h4.604V16.965h3.823l.587-3.913h-4.41v-2.5c0-1.123.347-1.903 2.198-1.903H22V5.16z" fill-rule="evenodd"></path></g></svg></span></a><a role="button" tabindex="0" class="at-icon-wrapper at-share-btn at-svc-twitter" style="background-color: #EC7C03; border-radius: 4px;"><span class="at4-visually-hidden">Share to Twitter</span><span class="at-icon-wrapper" style="line-height: 16px; height: 16px; width: 16px;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" version="1.1" role="img" aria-labelledby="at-svg-twitter-2" class="at-icon at-icon-twitter" style="fill: rgb(255, 255, 255); width: 16px; height: 16px;"><title id="at-svg-twitter-2">Twitter</title><g><path d="M27.996 10.116c-.81.36-1.68.602-2.592.71a4.526 4.526 0 0 0 1.984-2.496 9.037 9.037 0 0 1-2.866 1.095 4.513 4.513 0 0 0-7.69 4.116 12.81 12.81 0 0 1-9.3-4.715 4.49 4.49 0 0 0-.612 2.27 4.51 4.51 0 0 0 2.008 3.755 4.495 4.495 0 0 1-2.044-.564v.057a4.515 4.515 0 0 0 3.62 4.425 4.52 4.52 0 0 1-2.04.077 4.517 4.517 0 0 0 4.217 3.134 9.055 9.055 0 0 1-5.604 1.93A9.18 9.18 0 0 1 6 23.85a12.773 12.773 0 0 0 6.918 2.027c8.3 0 12.84-6.876 12.84-12.84 0-.195-.005-.39-.014-.583a9.172 9.172 0 0 0 2.252-2.336" fill-rule="evenodd"></path></g></svg></span></a><a role="button" tabindex="0" class="at-icon-wrapper at-share-btn at-svc-compact" style="background-color: #EC7C03; border-radius: 4px;"><span class="at4-visually-hidden">Share to Più...</span><span class="at-icon-wrapper" style="line-height: 16px; height: 16px; width: 16px;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" version="1.1" role="img" aria-labelledby="at-svg-addthis-3" class="at-icon at-icon-addthis" style="fill: rgb(255, 255, 255); width: 16px; height: 16px;"><title id="at-svg-addthis-3">AddThis</title><g><path d="M18 14V8h-4v6H8v4h6v6h4v-6h6v-4h-6z" fill-rule="evenodd"></path></g></svg></span></a></div></div> 
129	    
130	    FINE PEZZOTTO --> 
131	    
132	    
133	   <!-- /div --> 
134		  
135	</div>  
136 
137	 
138	 <h1 class="title" >${Ttiolo.getData()}</h1> 
139 
140 
141 
142 
143 <#if tagName?? && tagName?upper_case != "VIDEO"> 
144 <#if Ttiolo.Foto.getData()?? && Ttiolo.Foto.getData() != ""> 
145	<img class="mb-4 img-fluid" data-fileentryid="${Ttiolo.Foto.getAttribute("fileEntryId")}" alt="${Ttiolo.Foto.getAttribute("alt")}" src="${Ttiolo.Foto.getData()}"   style="width: 100% !important; border-radius: 8px;width: inherit" /> 
146 
147 </#if> 
148</#if> 
149 
150<#if Ttiolo.LinkVideo?? && Ttiolo.LinkVideo.getData() != ""> 
151 <p class="text-center"> 
152                <iframe src="${Ttiolo.LinkVideo.getData()}" width="700px" height="394px" frameborder="0"  
153                allowfullscreen></iframe> 
154              </p> 
155			   
156</#if>			   
157 
158 
159<div class="classContenuto"> 
160<#if Ttiolo.Contenuto.getData() != "" && !Ttiolo.Contenuto.getData()?contains("<p>null</p>")> 
161${Ttiolo.Contenuto.getData()} 
162 
163 
164</#if> 
165 
166<#if Ttiolo.FileMedia?? && Ttiolo.FileMedia.getData()?? && Ttiolo.FileMedia.getData() != ""> 
167Video presente  
168<a href="${Ttiolo.FileMedia.getData()}"> 
169	${languageUtil.format(locale, "download-x", "qui", false)} 
170</a> 
171</#if> 
172 
173</div> 
174 
175  </div> <!-- chiusura prima colonna --> 
176   
177  
178 </div> 
179 </section> 
180  
181 </main> 
182 
183 
184 
185 
186<#-- CSS PER NASCONDERE IL TITOLO DEL WEB CONTENT --> 
187<style type="text/css"> 
188.header-title {display: none !important;} 
189.asset-title {display: none !important;} 
190 
191.cng .classContenuto{ 
192    font-size:1.1rem !important; 
193    text-align:justify; 
194
195/* modifico */ 
196 
197.asset-full-content { 
198    display: block; 
199	/*border: 1px solid red;*/ 
200
201 
202 
203 
204.mainHeader { 
205  padding: 120px 0 80px; 
206
207 
208<#-- DIV PER IL BANNER SOPRA --> 
209   <div class="mainHeader header05"> 
210        <div class="container"> 
211          <div class="mainHeader-inner"> 
212            <h3>News &amp; Media</h3> 
213            <h1>Notizie ed eventi</h1> 
214          </div> 
215        </div> 
216      </div> 
217<#-- FINE DIV PER BANNER --> 
218 
219 
220<#-- =================== PARTI GENERICHE ======================== --> 
221 
222<#--  
223<textarea style="height: 800px; width: 500px;"> 
224${docTotale}  
225 
226</textarea> 
227--> 
228 
229<#-- ===================	PER RECUPERARE IL JSON DELLA STRUTTURA =================== 
230<#assign  structureKey = DDMStructureLocalService.getStructure(134816) /> 
231 
232 <h1>${structureKey}</h1> --> 
233 
234 
235<#-- =================== FINE PARTI GENERICHE =================== --> 
236 
237 
238<#-- =================== INIZIO PARTE NEWS LOOP  =================== --> 
239 
240 <main class=""> 
241      <section class="section"> 
242        <div class="container"> 
243 
244<#if entries?has_content> 
245	 
246	<#assign idxLoop = 0 /> 
247	 
248	<#list entries as curEntry> <#-- INIZIO LOOP (indici 0-based)--> 
249 
250 
251<#assign idxLoop = curEntry?index /> 
252 
253<#if idxLoop % 4 == 0 > 
254 
255<#if idxLoop != 0> <#-- se non è il primo gruppo di 4 elementi chiudo il precedente --> 
256</div> 
257</#if> 
258 
259<#-- inizio il nuovo gruppo --> 
260<div class="row mb-5"> 
261</#if> 
262 
263 
264<#-- A GRUPPI DI 4 ELEMENTI DELLA LISTA DEVO GENERARE LA STRUTTURA <div class="row mb-5"> --> 
265 
266<#assign newsTitle = curEntry.getTitle(locale) /> 
267<#assign newsSummary = curEntry.getSummary(locale) /> 
268<#assign dataPub = curEntry.getPublishDate() /> 
269 
270 
271 
272<#assign renderer = curEntry.getAssetRenderer() /> 
273<#assign Article = renderer.getArticle() /> 
274<#assign smallImageID = Article.getSmallImageId() /> 
275<#if smallImageID??> 
276<#assign  smallImageURL = "/image/image_gallery?img_id=${smallImageID}" /> 
277<#else> 
278<#assign  smallImageURL = Article.getSmallImageURL() /> 
279</#if> 
280 
281<#assign  viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
282<#assign viewURLAsset = renderer.getURLViewInContext(renderRequest, renderResponse, viewURL)  /> 
283 
284 
285 
286<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
287<#assign DDMStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService") > 
288<#assign article = journalArticleLocalService.getLatestArticle(Article.resourcePrimKey) /> 
289<#assign docTotale = article.getContentByLocale(localeUtil.toLanguageId(localeUtil.getDefault())) /> 
290<#assign doc = saxReaderUtil.read(article.getContentByLocale(localeUtil.toLanguageId(localeUtil.getDefault()))) /> 
291 
292<#-- INIZIO LETTURA CAMPI --> 
293<#assign rootElement = doc.getRootElement() /> 
294<#assign  news = rootElement.selectNodes("/Ttiolo") /> 
295 
296<#assign titoloNodePath = saxReaderUtil.createXPath("dynamic-element[@name='Ttiolo']") /> 
297<#assign titoloNode = titoloNodePath.selectSingleNode(rootElement) /> 
298 
299<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-content")  /> 
300<#assign titoloVal = xPathSelector.selectSingleNode(titoloNode).getStringValue() /> 
301 
302<#assign xPathData = saxReaderUtil.createXPath("dynamic-element[@name='DataNotizia']/dynamic-content")  /> 
303<#assign dataNotizia = xPathData.selectSingleNode(titoloNode).getStringValue() /> 
304 
305<#assign xPathAbstract = saxReaderUtil.createXPath("dynamic-element[@name='Abstract']/dynamic-content")  /> 
306<#assign abstract = xPathAbstract.selectSingleNode(titoloNode).getStringValue() /> 
307 
308<#assign xPathFoto = saxReaderUtil.createXPath("dynamic-element[@name='Foto']/dynamic-content")  /> 
309<#assign fotoLink = xPathFoto.selectSingleNode(titoloNode).getStringValue() /> 
310 
311 
312<#-- ========== COSTRUZIONE HTML SINGOLA NEWS ==================== --> 
313 
314<!-- 
315<h2 style="color:red">${viewURL}</h2> 
316<h2 style="color:green">${viewURLAsset}</h2> 
317 
318?replace('wm9stv169C42','WBh1QsINxArE') 
319--> 
320 
321 
322 
323 
324 <div class="col-lg-3 col-12"> 
325              <a href="${viewURLAsset}" class="news-card card"> 
326                <div class="img-box"> 
327                   
328				  <#if fotoLink?? && fotoLink != ""> 
329						<img src="${fotoLink}" alt=""> 
330				  </#if> 
331				  
332                </div> 
333                 
334              </a> 
335			  
336                  
337				<#if fotoLink?? && fotoLink != ""> 
338					<h5 class="titolinews mt-4">${titoloVal}</h5>    
339				<#else> 
340					<a href="${viewURLAsset}" class="news-card card"><h5 class="titolinews mt-4">${titoloVal}</h5>  </a> 
341				</#if> 
342				    
343                 <#if dataNotizia?? && dataNotizia?has_content> 
344				   <#assign someDate = dataNotizia?date.xs> 
345					<p class="subtitle" style="color: dimgray">${someDate?string["dd/MM/yyyy"]}</p>      
346				</#if>     
347 
348 
349				 
350 </div> 
351 
352 
353 
354 
355 
356<#-- =================== FINE COSTRUZIONE SINGOLA News ======================= --> 
357 
358 
359<#-- FINE --> 
360 
361	 
362 
363 
364 
365 
366 
367	</#list> <#-- FINE LOOP --> 
368	 
369<#-- se l'ultimo indice generato è mod 4 allora vuol dire che il penultimo,quello del ciclo non è multiplo di quattro 
370per cui va chiuso l'ultimo div aperto  -->	 
371<#if idxLoop %4 == 0>  
372</div> 
373</#if> 
374	 
375	 
376	 
377	 
378</#if> 
379<#-- FINE  NEWS LOOP --> 
380 
381   </div> <#-- chiusura div.container --> 
382      </section> 
383 </main> 
384 
385 
386 
387 
388 
389<#-- CSS PER NASCONDERE IL TITOLO DEL WEB CONTENT --> 
390<style type="text/css"> 
391 
392.cng .tag-news:hover{ 
393  text-decoration: none; 
394
395 
396 
397.portlet-title-text{display: none;} 
398 
399 
400.cng .news-card { 
401  display:flow-root;  
402  font-size: 22px; 
403  background: transparent; 
404  text-align: center; 
405  font-weight: 700; 
406  line-height: 1.1; 
407  padding: 0; 
408  color: var(--black); 
409  -webkit-transition: background 200ms; 
410  -moz-transition: background 200ms; 
411  -ms-transition: background 200ms; 
412  -o-transition: background 200ms; 
413  transition: background 200ms; 
414
415 
416.cng .news-card:hover { 
417  background: #fff; 
418  text-decoration: none; 
419  color: var(--black); 
420  -webkit-transition: background 200ms; 
421  -moz-transition: background 200ms; 
422  -ms-transition: background 200ms; 
423  -o-transition: background 200ms; 
424  transition: background 200ms; 
425
426 
427.cng .news-card .card-img { 
428  width: 70px; 
429  height: 70px; 
430  margin: 0; 
431  display: flex; 
432  align-items: center; 
433  justify-content: center; 
434    float: left; 
435
436 
437.cng .news-card img { 
438    border-radius: 8px; 
439
440 
441.cng .news-card p { 
442  margin-bottom: 0; 
443  margin-top: 1rem; 
444  font-size: 1.1rem;     
445 
446
447 
448.cng .titolinews { 
449  font-size: 1.0rem; 
450  font-weight: 600; 
451
452 
453.cng .tag-news { 
454  border-radius: 5px; 
455  padding: 5px; 
456  background-color: var(--orange); 
457  font-size: 12px; 
458  text-decoration: none; 
459
460 
461 
462/***** END  CARD NEWS *****/ 
463 
464.cng h2, .cng section{ 
465  margin-top: 0; 
466
467 
468 
469.header-back-to{ 
470	display: none; 
471
472 
473 
474  <#if themeDisplay.isSignedIn() > 
475   
476.h2{ 
477display: inline; 
478z-index: 300000; 
479
480<#else> 
481 
482/* per nascondere pulsante di ritorno all'elenco delle news/video */ 
483.h2{ 
484display: none; 
485display: inline; 
486
487 
488 
489</#if> 
490 
491 
492</style> 
493<#assign js_folder = themeDisplay.getPathThemeImages() + "/../js" /> 
494 
495<div id="testDiv"></div> 
496<script> 
497 
498Liferay.Portlet.ready( 
499 
500	/* 
501	This function gets loaded after each and every portlet on the page. 
502 
503	portletId: the current portlet's id 
504	node: the Alloy Node object of the current portlet 
505	*/ 
506 
507	function(portletId, node) { 
508	 
509	//alert('portlet id: ' + portletId + ' node: ' + node); 
510	 
511
512); 
513 
514 
515</script> 
516 
517 
518	<!-- script type="text/javascript" src = "https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5faeb58eadfcda74">	</script  ->