Scenari
Open Innovation
14 Nov 24
The following has evaluated to null or missing: ==> themeDisplay.getThemeSetting("news-vocabulary-id") [in template "51632#51678#43587" at line 22, column 20] ---- 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: vocabularyId = themeDisplay.getThemeS... [in template "51632#51678#43587" at line 22, column 5] ----
1<#--sella social macro -->
2<#include "${templatesPath}/SOCIAL-SHARE-MACRO" />
3
4<#assign originalLocale = locale>
5<#setting locale = 'en_US'>
6<#assign date = .vars['reserved-article-display-date'].data/>
7<#assign date = date?datetime("EEE, d MMM yyyy HH:mm:ss Z") />
8<#setting locale = originalLocale>
9<#assign dateTimeFormat = languageUtil.get(locale, "HH:mm, dd MMM yyyy")>
10
11
12<#assign
13 articleId = .vars['reserved-article-id'].data
14 journalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
15 assetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")
16 ja = journalService.fetchLatestArticle(themeDisplay.getScopeGroupId(), articleId, 0)
17 ae = assetEntryService.fetchEntry("com.liferay.journal.model.JournalArticle", ja.getResourcePrimKey())
18 title = .vars['reserved-article-title'].data
19 jaAbstract = .vars['reserved-article-description'].data
20 absoluteURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()
21 altBigDetailImage = ""
22 vocabularyId = themeDisplay.getThemeSetting("news-vocabulary-id")?number
23 category = sella_tool.getCategoryFromVocabularyId(ae.getCategories(), vocabularyId, locale)
24/>
25
26<#if !vocabularyIdLive?? && !themeDisplay.getThemeSetting("news-vocabulary-id-live")?? >
27 <#assign vocabularyIdLive = 52307 />
28<#else>
29 <#assign vocabularyIdLive = themeDisplay.getThemeSetting("news-vocabulary-id-live")?number />
30</#if>
31
32<#if category=="">
33 <#assign category = sella_tool.getCategoryFromVocabularyId(ae.getCategories(), vocabularyIdLive , locale) />
34</#if>
35
36<#-- ja title -->
37<#if titleShown?? && titleShown.getData()?has_content>
38 <#assign title = titleShown.getData() />
39</#if>
40
41<#if HeroImage.getAttribute("fileEntryId")?? >
42 <#assign socialImg = themeDisplay.getPortalURL() + sella_tool.getAdaptiveMediaSrc("800-x-533-px",HeroImage.getAttribute("fileEntryId")?number,HeroImage.name) />
43<#else>
44 <#assign socialImg = "">
45</#if>
46
47<@shareContent title="${title}" summary="${jaAbstract}" detailURL="${absoluteURL}" imageURL="${socialImg}"/>
48
49
50
51<article class="article-detail article-detail--has-img">
52 <#-- Info + Social -->
53 <div class="container">
54 <div class="row">
55 <div class="col-md-10 offset-md-1">
56 <div class="article-detail__intro">
57 <div class="row">
58 <div class="col-lg-8">
59 <#-- Categoria e data -->
60 <div class="d-flex">
61 <#if category?? && category?has_content>
62 <div class="article-detail__category">${category}</div>
63 </#if>
64 <div class="article-detail__date">${date?string(dateTimeFormat)}</div>
65 </div>
66 <#-- Titolo -->
67 <h1 class="article-detail__title">${title}</h1>
68 <#-- Sottotitolo -->
69 <#if jaAbstract?has_content>
70 <h2 class="article-detail__subject">${jaAbstract}</h2>
71 </#if>
72
73 </div>
74 </div>
75 <div class="row">
76 <div class="col-12">
77 <div class="article-detail__button d-flex">
78 <#-- Share button -->
79 <div class="sella-share clearfix">
80 <div class="sella-share__icon sella-share__icon--share">
81 <svg class="ico-svg">
82 <use xlink:href="${themeDisplay.getPathThemeImages()}/assets/images/icons.svg#share-alt"></use>
83 </svg>
84 </div>
85 <div class="sella-share__text">Condividi</div>
86 <ul>
87 <li>
88 <a href="http://www.facebook.com/sharer.php?u=${absoluteURL}" title="Facebook" class="sella-share__icon sella-share__icon--fb">
89 <svg class="ico-svg">
90 <use xlink:href="${themeDisplay.getPathThemeImages()}/assets/images/icons.svg#facebook-f"></use>
91 </svg>
92 </a>
93 </li>
94 <li>
95 <a href="https://twitter.com/home?status=${absoluteURL}" title="Twitter" class="sella-share__icon sella-share__icon--twitter">
96 <svg class="ico-svg">
97 <use xlink:href="${themeDisplay.getPathThemeImages()}/assets/images/icons.svg#twitter"></use>
98 </svg>
99 </a>
100 </li>
101 <li>
102 <#assign escapedTitle = htmlUtil.escape(htmlParserUtil.extractText(title)) />
103 <#assign escapedAbstract = htmlUtil.escape(htmlParserUtil.extractText(jaAbstract)) />
104
105 <a href="http://www.linkedin.com/shareArticle?mini=true&url=${absoluteURL}&title=${escapedTitle}&summary=${escapedAbstract}&source=" title="LinkedIn" class="sella-share__icon sella-share__icon--linkedin">
106 <svg class="ico-svg">
107 <use xlink:href="${themeDisplay.getPathThemeImages()}/assets/images/icons.svg#linkedin-in"></use>
108 </svg>
109 </a>
110 </li>
111 <li>
112 <a href="https://api.whatsapp.com/send?text=${urlCodec.encodeURL(absoluteURL)}" title="WahtsApp" class="sella-share__icon sella-share__icon--whatsapp">
113 <svg class="ico-svg">
114 <use xlink:href="${themeDisplay.getPathThemeImages()}/assets/images/icons.svg#whatsapp"></use>
115 </svg>
116 </a>
117 </li>
118 </ul>
119 </div>
120 </div>
121 </div>
122 </div>
123 </div>
124 </div>
125 </div>
126 </div>
127
128
129<#if HeroImage?? && HeroImage.getData() != "">
130 <#assign altBigDetailImage = HeroImage.getAttribute("alt") />
131 <#assign urlBigDetailImage = HeroImage.getData() />
132</#if>
133<#if urlBigDetailImage?? && urlBigDetailImage?has_content>
134 <div class="sella-container sella-container--only-img">
135 <div class="container-fluid">
136
137 <#-- VIDEO -->
138 <div class="row">
139 <div class="col-lg-10 offset-lg-1">
140 <#if Video?? && Video?has_content >
141 <#if Video.getData()?? && Video.getData() != "">
142 <#if Video.getData()?contains("vimeo")>
143 <#if HeroImage.getAttribute("fileEntryId")?? >
144 <#assign HeroImage800x533 = sella_tool.getAdaptiveMediaSrc("800-x-533-px",HeroImage.getAttribute("fileEntryId")?number,HeroImage.name) />
145 <#else>
146 <#assign HeroImage800x533 = "">
147 </#if>
148 <video width="100%" controls="" poster="${HeroImage800x533}">
149 <source src ="${Video.getData()}" type="video/mp4">
150 </video>
151 <#else>
152 <iframe width="100%" height="350px" src="${Video.getData()}?controls=0" ></iframe>
153 </#if>
154 <#else>
155 <#if HeroImage?? && HeroImage?has_content >
156 <#if HeroImage.getData()?? && HeroImage.getData() != "">
157 <#if HeroImage.getAttribute("fileEntryId")?? >
158 <#assign HeroImage800x533 = sella_tool.getAdaptiveMediaSrc("800-x-533-px",HeroImage.getAttribute("fileEntryId")?number,HeroImage.name) />
159 <figure class="article-detail__fig">
160 <img class="article-detail__img w-100" src="${HeroImage800x533}" alt="${HeroImage.getAttribute("alt")}">
161 <#if ImageOwner.getData()?? && ImageOwner.getData()!="" && HeroImage.getAttribute("alt") != "" >
162 <figcaption class="article-detail__figcaption">${HeroImage.getAttribute("alt")} - <strong>${ImageOwner.getData()}</strong></figcaption>
163 <#else>
164 <figcaption class="article-detail__figcaption">${HeroImage.getAttribute("alt")} - <strong>${ImageOwner.getData()}</strong></figcaption>
165 </#if>
166 </figure>
167 </#if>
168 </#if>
169 </#if>
170 </#if>
171 </#if>
172 </div>
173 </div>
174 </div>
175 </div>
176</#if>
177
178<#-- testo -->
179<#if Body?? && Body.getData()?has_content>
180 <div class="container">
181 <div class="row">
182 <div class="col-md-8 offset-md-2 col-xl-6 offset-xl-3">
183 <div class="article-detail__text">
184 ${Body.getData()}
185 </div>
186 </div>
187 </div>
188 </div>
189</#if>
190
191<div class="article-detail__slider">
192 <div class="container">
193 <div class="row">
194 <div class="col-12">
195 <div class="slider slider-detail">
196 <#if GalleryImage?has_content && GalleryImage??>
197 <#if GalleryImage.getData()?? && GalleryImage.getData() != "" >
198 <#list GalleryImage.getSiblings() as curImage>
199 <#if curImage.getAttribute("fileEntryId")?? >
200 <#assign curGalleryImage800x533 = sella_tool.getAdaptiveMediaSrc("800-x-533-px",curImage.getAttribute("fileEntryId")?number,curImage.name) />
201 <div>
202 <div class="article-detail__gallery">
203 <a href="${curGalleryImage800x533}" title="${curImage.getAttribute("alt")}">
204 <img src="${curGalleryImage800x533}" alt="${curImage.getAttribute("alt")}" class="w-100">
205 </a>
206 <#if curImage.GalleryImageOwner.getData()?? && curImage.GalleryImageOwner.getData()!="" && curImage.getAttribute("alt") != "" >
207 <div class="article-detail__gallery-caption">${curImage.getAttribute("alt")} - <strong>${curImage.GalleryImageOwner.getData()}</strong></div>
208 </#if>
209 </div>
210 </div>
211 </#if>
212 </#list>
213 </#if>
214 </#if>
215 </div>
216 </div>
217 </div>
218 </div>
219</div>