Portale della Fondazione Opera San Camillo - Archivio News - Cremona
Si è verificato un errore nell'elaborarazione del modello.
The string doesn't match the expected date/time/date-time format. The string to parse was: "". The expected format was: "yyyy-MM-dd". The nested reason given follows: Unparseable date: "" ---- FTL stack trace ("~" means nesting-related): - Failed at: DataDate = Data?date("yyyy-MM-dd") [in template "20116#20152#74452" at line 30, column 25] - Reached through: #assign-container [in template "20116#20152#74452" at line 14, column 13] ----
1<#setting time_zone=timeZone.ID>
2<#setting locale=locale.toString()>
3<#setting datetime_format="YYYY-MM-dd">
4
5
6<h1>News & Eventi</h1>
7
8<#if entries?has_content>
9 <#list entries as curEntry>
10 <#assign
11 renderer = curEntry.getAssetRenderer()
12 className = renderer.getClassName() />
13 <#if className == "com.liferay.journal.model.JournalArticle">
14 <#assign
15 journalArticle = renderer.getArticle()
16 document = saxReaderUtil.read(journalArticle.getContent())
17 rootElement = document.getRootElement()
18
19 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Immagine']")
20 Immagine = xPathSelector.selectSingleNode(rootElement).getStringValue()
21
22 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Sommario']")
23 Sommario = xPathSelector.selectSingleNode(rootElement).getStringValue()
24
25 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Contenuto']")
26 Contenuto = xPathSelector.selectSingleNode(rootElement).getStringValue()
27
28 xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Data']")
29 Data = xPathSelector.selectSingleNode(rootElement).getStringValue()?replace(" ", "")?replace("\n", "")?replace("\t", "")
30 DataDate = Data?date("yyyy-MM-dd")
31
32 viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry, true)
33 />
34
35 <#if assetLinkBehavior != "showFullContent">
36 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry, true) />
37 </#if>
38
39 <div class="news-list">
40 <div class="row">
41 <div class="col-sm-3">
42 <img class="img-full" src="${Immagine}" alt="${curEntry.getTitle(locale)}">
43 </div>
44 <div class="col-sm-9">
45 <div class="news-list-data"><i class="fa fa-calendar" aria-hidden="true"></i> ${DataDate?string("dd MMMM yyyy")}</div>
46 <h2><a href="${viewURL}">${curEntry.getTitle(locale)}</a></h2>
47 <p>${Sommario}</p>
48 </div>
49 </div>
50 </div>
51 </#if>
52 </#list>
53</#if>