Contenuto con Diario Impegno sociale .

Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> blank  [in template "114284#114319#581019" at line 165, column 72]

----
Tip: If the failing expression is known to be 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: ${blank}  [in template "114284#114319#581019" at line 165, column 70]
----
1<#assign 
2    DLAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"] 
3    mkspAPI = serviceLocator.findService("eu.suggesto.suggestogui.service.SuggestoGuiLocalService") 
4    catsService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
5    serverName = request.getServerName() 
6    defLng = themeDisplay.getSiteDefaultLocale() 
7     
8    id_vocabolario_diario = 572714 
9/> 
10<div class="gradient_bg"> 
11    <div class="page_content container-fluid text-center pt-5 pb-0"> 
12    	<h1 class="pb-3">Il nostro Diario</h1> 
13    	<img style="max-width:200px;" src="${themeDisplay.getPathThemeImages()}/diario.png"/> 
14    </div> 
15     
16    <div class="row_di_cosa_parliamo container pb-5" style="display:none !important;"> 
17     
18    	<div class="row justify-content-center"> 
19     
20            <#list catsService.getVocabularyCategories(id_vocabolario_diario, -1, -1, null) as cat> 
21                <#assign  
22                    catUrl = renderResponse.createRenderURL() 
23                /> 
24                 
25    	        ${catUrl.setParameter("categoryId", cat.categoryId?string)} 
26                 
27                <a href="${catUrl}" class="col-lg-4 col-md-6 my-2"> 
28        			<div class=" d-flex align-items-center p-1 single_argomento"> 
29        			    <#assign full_obj = jsonFactoryUtil.looseSerialize(cat) > 
30                        ${jsonFactoryUtil.createJSONObject(full_obj).getString("descriptionCurrentValue")} 
31        				<p class="pl-3">${cat.getName()}</p> 
32        			</div> 
33        		</a> 
34            </#list> 
35     
36    	</div> 
37    </div> 
38     
39    <div class="list_blog container pb-5"> 
40    	<div class="row row_principale"> 
41    	 
42            <#if entries?has_content> 
43             
44                <#assign  
45                    num_block = 1 
46                /> 
47             
48                <div class="col-lg-8"> 
49                <#list entries as entry> 
50                    <#assign 
51                        entry = entry 
52                        assetRenderer = entry.getAssetRenderer() 
53                        className = assetRenderer.getClassName() 
54                        entryTitle = htmlUtil.escape(assetRenderer.getTitle(themeDisplay.getLocale())) 
55                    /> 
56                    
57                    <#if className == "com.liferay.journal.model.JournalArticle"> 
58                        <#assign 
59                            journalArticle = assetRenderer.getArticle() 
60                            document = saxReaderUtil.read(journalArticle.getContent()) 
61                            rootElement = document.getRootElement() 
62                        /> 
63                         
64                         
65                        <#-- FORMATTAZIONE DATA ("dataContenuto" √® la data finale da usare) --> 
66                         
67                        <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Datacd0n']")>  
68                        <#if xPathSelector.selectSingleNode(rootElement)??> 
69                            <#assign stringData = xPathSelector.selectSingleNode(rootElement).getStringValue()?trim> 
70                            <#setting locale = themeDisplay.getLocale()> 
71                             
72                            <#if validator.isNotNull(stringData)> 
73                                <#assign dataObj = dateUtil.parseDate("yyyy-MM-dd", stringData, locale)> 
74                                <#assign dataContenuto = dateUtil.getDate(dataObj, "dd MMMM yyyy", locale)> 
75                            <#else> 
76                                <#assign dataContenuto = ""> 
77                            </#if> 
78                        </#if> 
79                        
80                        <#assign stringSelector = "dynamic-element[@name='ImmaginePrincipale']"> 
81                        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
82                        <#if xPathSelector.selectSingleNode(rootElement)??> 
83                            <#assign 
84                                immagine = xPathSelector.selectSingleNode(rootElement).getStringValue() 
85                                fileEntryId = assetRenderer.getClassPK() 
86                            /> 
87                            <#if immagine?trim?has_content> 
88                                <#assign 
89                                    jsonField = jsonFactoryUtil.createJSONObject(immagine) 
90                                    fileEntry = DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(jsonField.uuid, groupId) 
91                                    immagine = "/documents/" + jsonField.groupId + "/" + fileEntry.folderId + "/" + jsonField.title + "/" + jsonField.uuid 
92                                /> 
93                            <#else> 
94                                <#assign immagine = "https://via.placeholder.com/450x300?text=Placeholder"> 
95                            </#if> 
96                        </#if> 
97                         
98                        <#assign stringSelector = "dynamic-element[@name='Icona']"> 
99                        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
100                        <#if xPathSelector.selectSingleNode(rootElement)??> 
101                            <#assign 
102                                icona = xPathSelector.selectSingleNode(rootElement).getStringValue() 
103                                fileEntryId = assetRenderer.getClassPK() 
104                            /> 
105                            <#if icona?trim?has_content> 
106                                <#assign 
107                                    jsonField = jsonFactoryUtil.createJSONObject(icona) 
108                                    fileEntry = DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(jsonField.uuid, groupId) 
109                                    icona = "/documents/" + jsonField.groupId + "/" + fileEntry.folderId + "/" + jsonField.title + "/" + jsonField.uuid 
110                                /> 
111                            <#else> 
112                                <#assign icona = "https://via.placeholder.com/450x300?text=Placeholder"> 
113                            </#if> 
114                        </#if> 
115                        
116                        <#assign stringSelector = "dynamic-element[@name='DescrizioneBreve']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
117                        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
118                        <#if xPathSelector.selectSingleNode(rootElement)??> 
119                            <#assign testo = xPathSelector.selectSingleNode(rootElement).getStringValue()> 
120                        </#if> 
121                        
122                        <#assign stringSelector = "dynamic-element[@name='ext_link']/dynamic-content[@language-id = '" + themeDisplay.getLocale() + "']"> 
123                        <#assign xPathSelector = saxReaderUtil.createXPath(stringSelector)> 
124                        <#if xPathSelector.selectSingleNode(rootElement)??> 
125                            <#assign viewUrl = xPathSelector.selectSingleNode(rootElement).getStringValue()> 
126                            <#assign blank = "target='_blank'"> 
127                            <#if viewUrl?trim == ''> 
128                                <#assign blank = ""> 
129                                <#assign viewUrl = mkspAPI.getArticleUrl(groupId, serverName, journalArticle.articleId, localeUtil.fromLanguageId(themeDisplay.getLocale()), defLng, "/articoli-diario")> 
130                            </#if> 
131                        <#else> 
132                            <#assign viewUrl = mkspAPI.getArticleUrl(groupId, serverName, journalArticle.articleId, localeUtil.fromLanguageId(themeDisplay.getLocale()), defLng, "/articoli-diario")> 
133                        </#if> 
134         
135         
136                        <#assign 
137                            list_categories = entry.getCategories() 
138                        /> 
139         
140                        <#if num_block == 1> 
141                            <!-- blocco principale - immagine centrale con testo sotto --> 
142                			<div class="blocco_principale text_content text-center my-2 mt-sm-5 p-3 pb-5"> 
143                                <div class="btn_diary"> 
144                                    <#list list_categories as single_cat> 
145                                        <span class="btn mt-4 ml-4"> 
146                                            ${single_cat.getName()} 
147                                        </span> 
148                                    </#list> 
149                                </div> 
150     
151                                <div class="contain_img"> 
152                				    <img src="${immagine}"> 
153            				    </div> 
154            				    <div class="btn_diary" style="position:relative;"> 
155        							<#list list_categories as single_cat> 
156                                        <span class="btn mt-5"> 
157                                            ${single_cat.getName()} 
158                                        </span> 
159                                    </#list> 
160                                </div> 
161                				<h2 class="pt-2">${entryTitle}</h2> 
162                				<span class="d-block pb-2">${dataContenuto}</span> 
163                				${testo} 
164                				<!-- lo stile lo trovi nel general style --> 
165                				<a href="${viewUrl}" ${blank} class="vedi_tutte">leggi tutto</a> 
166                			</div> 
167            			<#elseif num_block == 2 || num_block == 3> 
168                			<div class="text_on_block <#if num_block == 2>pos_left<#else>pos_right</#if> my-md-0 my-2"> 
169            					<div class="text_content text-center p-sm-4 p-3 w-100 h-100"> 
170            					    <a href="${viewUrl}" ${blank}> 
171            					        <div class="contain_img mb-4"> 
172                						    <img src="${getPrefix(immagine, 320, '')}"> 
173            						    </div> 
174                						<div class="btn_diary"> 
175                    						<#list list_categories as single_cat> 
176                                                <span class="btn"> 
177                                                    ${single_cat.getName()} 
178                                                </span> 
179                                            </#list> 
180                                        </div> 
181                						<h2 class="pt-4"> 
182                							${entryTitle} 
183                						</h2> 
184                						<span class="d-block pb-2">${dataContenuto}</span> 
185                						${testo} 
186            						</a> 
187            					</div> 
188                			</div> 
189                        <#elseif num_block == 4> 
190                			<!-- immagine sulla sinistra con testo a destra --> 
191                			<div class="text_content clear_this text-center mt-sm-5 p-sm-4 p-3"> 
192                				<a href="${viewUrl}" ${blank} class="row align-items-center"> 
193                				 
194                					<div class="col-md-6"> 
195                					    <div class="contain_img"> 
196                						    <img src="${getPrefix(immagine, 350, '')}"> 
197            						    </div> 
198                					</div> 
199                 
200                					<div class="col-md-6"> 
201                					    <div class="btn_diary"> 
202                    						<#list list_categories as single_cat> 
203                                                <span class="btn mt-lg-0 mt-4"> 
204                                                    ${single_cat.getName()} 
205                                                </span> 
206                                            </#list> 
207                                        </div> 
208                						<h2 class="pt-3"> 
209                							${entryTitle} 
210                						</h2> 
211                						<span class="d-block pb-2">${dataContenuto}</span> 
212                						${testo} 
213                					</div> 
214                				</a> 
215                			</div> 
216                        <#elseif num_block == 5 || num_block == 6> 
217                			<!-- coppia di div con immagine sopra e testo in verticale sotto --> 
218            				<div class="text_content text-center <#if num_block == 5>pos_left<#else>pos_right</#if> my-md-0 my-2 pt-5 p-sm-4 p-3"> 
219            				    <a href="${viewUrl}" ${blank}> 
220            				        <div class="contain_img mb-4"> 
221            						    <img src="${getPrefix(immagine, 320, '')}"> 
222        						    </div> 
223            						<div class="btn_diary"> 
224                						<#list list_categories as single_cat> 
225                                            <span class="btn"> 
226                                                ${single_cat.getName()} 
227                                            </span> 
228                                        </#list> 
229                                    </div> 
230            						<h2 class="pt-4"> 
231            							${entryTitle} 
232            						</h2> 
233            						<span class="d-block pb-2">${dataContenuto}</span> 
234            						${testo} 
235            				    </a> 
236        				    </div> 
237                        <#else> 
238                			<!-- immagine sulla destra con testo sulla sinistra --> 
239                			<div class="text_content clear_this text-center mt-sm-5 p-sm-4 p-3"> 
240                				<a href="${viewUrl}" ${blank} class="row align-items-center"> 
241                				 
242                					<div class="col-md-6"> 
243                					    <div class="btn_diary"> 
244                    						<#list list_categories as single_cat> 
245                                                <span class="btn"> 
246                                                    ${single_cat.getName()} 
247                                                </span> 
248                                            </#list> 
249                                        </div> 
250                						<h2 class="pt-3 pb-sm-5 pb-3"> 
251                							${entryTitle} 
252                						</h2> 
253                						<span class="d-block pb-2">${dataContenuto}</span> 
254                						${testo} 
255                					</div> 
256                 
257                					<div class="col-md-6 pt-md-0 pt-3"> 
258                					    <div class="contain_img"> 
259                						    <img src="${getPrefix(immagine, 350, '')}"> 
260            						    </div> 
261                					</div> 
262                				</a> 
263                			</div> 
264            			</#if> 
265            			 
266            			<#assign  
267                            num_block++ 
268                        /> 
269                         
270                        <#if num_block == 8> 
271                            <#assign  
272                                num_block = 1 
273                            /> 
274                        </#if> 
275                         
276                    </#if> 
277                </#list> 
278                </div> 
279            </#if> 
280     
281    		<!-- blocco in evidenza sulla destra del contenitore principale --> 
282    		<div class="col-lg-4"> 
283    			<div class="in_evidenza pr-4 pl-4 pt-5 mb-5"> 
284    				<h3>In evidenza</h3> 
285    				<hr> 
286    				 
287    				<#assign preferences = freeMarkerPortletPreferences.getPreferences("portletSetupPortletDecoratorId", "barebone")> 
288         
289                    <@liferay_portlet["runtime"] 
290                        defaultPreferences="${preferences}" 
291                        portletProviderAction=portletProviderAction.VIEW 
292                        instanceId="diario_evidenza" 
293                        portletName="com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet" 
294                    /> 
295     
296    			</div> 
297    		</div> 
298    	</div> 
299    </div> 
300</div> 
301 
302<#function getPrefix img width height> 
303    <#assign 
304        baseUrl = "https://d28r45jypu6nt9.cloudfront.net/o/d40/img/" 
305        siteUrl = themeDisplay.getURLPortal()?replace("://", ".") 
306        w = width 
307        h = height 
308    /> 
309    <#if height?is_string> 
310        <#assign prefix = baseUrl + "w_" + w + "/" + siteUrl> 
311    <#else> 
312        <#assign prefix = baseUrl + "w_" + w + ",h_" + h + "/" + siteUrl> 
313    </#if> 
314     
315    <#if !img?contains("/documents/")> 
316        <#assign prefix = ""> 
317    </#if> 
318     
319    <#return prefix + img> 
320</#function>