Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> nome_categoria [in template "885268036#885268104#1120905145" at line 227, column 47] ---- 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: ${nome_categoria} [in template "885268036#885268104#1120905145" at line 227, column 45] ----
1<#-- file path: klabindw/assets/video-gallery/adts/video-gallery.ftl -->
2
3<style>
4.klb-blog-section-tag {
5 display: flex;
6 flex-direction: column;
7}
8
9.klb-blog-section-tag__top-detail {
10 height: 5px;
11 width: 100%;
12 background: linear-gradient(
13 180deg,
14 rgba(0, 0, 0, 0.16) 0%,
15 rgba(0, 0, 0, 0) 100%
16 );
17 opacity: 0.5;
18}
19
20.klb-blog-section-tag__container {
21 padding: 0 6vw;
22}
23
24.klb-blog-section-tag__wrapper {
25 padding: 40px 0 60px;
26 max-width: 1330px;
27 margin: auto;
28 display: flex;
29 flex-direction: column;
30}
31
32.klb-blog-section-tag__title {
33 font-size: 60px;
34 line-height: 110%;
35 text-align: center;
36 color: #231f20;
37 margin-bottom: 40px;
38}
39
40.klb-blog-section-tag__description {
41 font-family: "Raleway";
42 font-size: 18px;
43 line-height: 160%;
44 color: #231f20;
45 max-width: 900px;
46 margin: auto;
47 margin-bottom: 40px;
48}
49
50.klb-blog-section-tag__content {
51 display: flex;
52 flex-wrap: wrap;
53 gap: 20px;
54}
55
56.klb-blog-section-tag a {
57 text-decoration: none;
58}
59
60.klb-blog-section-tag__item:hover .klb-bigcard__title,
61.klb-blog-section-tag__item:hover .klb-card__title,
62.klb-blog-section-tag__item:hover .klb-bigcard__description,
63.klb-blog-section-tag__item:hover .klb-card__description {
64 color: #8B9F2F;
65}
66
67.klb-blog-section-tag__item {
68 flex: 1 1 23%;
69}
70
71.lfr-pagination ul {
72 display: flex;
73 justify-content: center;
74 gap: 20px;
75}
76
77.lfr-pagination li.disabled a {
78 opacity: 0.5;
79}
80
81.lfr-pagination li a {
82 border: 1px solid #00693A;
83 border-radius: 20px;
84 font-family: 'Raleway';
85 font-style: normal;
86 font-weight: 700;
87 font-size: 12px;
88 text-align: center;
89 text-transform: uppercase;
90 color: #00693A;
91 background: transparent;
92 padding: 8px 16px;
93 min-width: 110px;
94 transition: 0.3s;
95}
96
97.lfr-pagination li:not(.disabled):hover a {
98 background: #00693A;
99 color: #F4F4F4;
100}
101
102@media (max-width: 1024px) {
103 .klb-blog-section-tag__item {
104 flex: 1 1 24%;
105 }
106}
107
108@media (max-width: 900px) {
109 .klb-blog-section-tag__item {
110 flex: 1 1 40%;
111 }
112
113 .klb-blog-section-tag__title {
114 font-size: 30px;
115 line-height: 110%;
116 }
117
118 .klb-blog-section-tag__description {
119 font-size: 16px;
120 line-height: 160%;
121 }
122}
123
124@media (max-width: 660px) {
125 .klb-blog-section-tag__item {
126 flex: 0 0 100%;
127 }
128}
129
130</style>
131
132<#assign dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")>
133<#assign dlUtil = serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil")>
134<#assign vocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") />
135<#assign categoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
136
137
138<#function getParameter param>
139 <#assign parameter = httpUtil.getParameter(themeDisplay.getURLCurrent(), param.name, false) />
140 <#return (parameter?has_content && parameter != 'false')?then(parameter, param.default) />
141</#function>
142
143<#assign tag = getParameter({ "name": "tag", "default": "" }) />
144<#assign currentPage = getParameter({ "name": "page", "default": 1 })?number />
145
146<div class="klb-blog-section-tag">
147 <span class="klb-blog-section-tag__top-detail"></span>
148 <div class="klb-blog-section-tag__container">
149 <div class="klb-blog-section-tag__wrapper">
150 <div class="klb-blog-section-tag__title"></div>
151 <div class="klb-blog-section-tag__content"></div>
152 </div>
153 </div>
154</div>
155
156<script>
157 Liferay.on("allPortletsReady", function () {
158
159
160 var title = '${tag?replace("%20", " ")}';
161 var decodeTitle = decodeURI(title);
162 var capitalizeTitle = decodeTitle.charAt(0).toUpperCase() + decodeTitle.slice(1);
163
164 $(".klb-blog-section-tag__title").text(capitalizeTitle)
165
166 $("#klb-blog-footer").addClass("klb-blog-footer--secondary");
167 var klabinSustentabilidadeData = [
168 <#if entries?has_content>
169 <#list entries as entry>
170
171
172 <#list entry.tagNames as tagPost>
173
174
175 <#if tagPost==tag>
176 <#assign assetRenderer = entry.getAssetRenderer() />
177 <#assign article = assetRenderer.getArticle() />
178
179 <#assign document = saxReaderUtil.read(article.getContent()) />
180 <#assign rootElement = document.getRootElement() />
181
182 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='banner']")>
183 <#assign ImagemDeDestaque = xPathSelector.selectSingleNode(rootElement).getStringValue()?trim>
184
185 <#assign urlImage = "">
186 <#if ImagemDeDestaque?? && ImagemDeDestaque!="">
187 <#assign
188 fileJson = jsonFactoryUtil.createJSONObject(ImagemDeDestaque)
189 fileEntryId = getterUtil.getInteger(fileJson.get('fileEntryId'))
190 />
191 <#assign
192 fileEntry = dlAppService.getFileEntry(fileEntryId)
193 urlImage = dlUtil.getDownloadURL(fileEntry, fileEntry.getFileVersion(), themeDisplay, null)
194 />
195 </#if>
196
197 <#assign tituloXPath = saxReaderUtil.createXPath("dynamic-element[@name='titulo']") />
198 <#assign titulo = tituloXPath.selectSingleNode(rootElement).getStringValue()?trim />
199
200 <#assign tempoDeLeituraXPath = saxReaderUtil.createXPath("dynamic-element[@name='TempoDeLeitura']") />
201 <#assign TempoDeLeitura = tempoDeLeituraXPath.selectSingleNode(rootElement).getStringValue()?trim />
202
203 <#assign resumoXPath = saxReaderUtil.createXPath("dynamic-element[@name='resumo']") />
204 <#assign resumo = resumoXPath.selectSingleNode(rootElement).getStringValue()?trim />
205
206 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
207
208 <#if assetLinkBehavior != "showFullContent">
209 <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
210 </#if>
211
212 <#if entry.getCategories()??>
213 <#list entry.getCategories() as category>
214 <#assign nome_categoria = "">
215 <#assign vocabulary = vocabularyLocalService.getVocabulary(category.getVocabularyId()) />
216 <#if vocabulary.getTitle(locale) == "Temas dos posts">
217 <#assign nome_categoria += category.getName() >
218 </#if>
219 </#list>
220 </#if>
221
222 {
223 image: '${urlImage}',
224 title: '${titulo}',
225 time: '${TempoDeLeitura}',
226 description: '${resumo}',
227 category : '${nome_categoria}',
228 link: '${viewURL}'
229 },
230 </#if>
231 </#list>
232
233 </#list>
234 </#if>
235 ];
236
237var _categories = {
238 'TECNOLOGIA E INOVAÇÃO': 'https://blog.klabin.com.br/tecnologia-e-inovacao',
239 'E-COMMERCE': 'https://blog.klabin.com.br/e-commerce',
240 'SUSTENTABILIDADE': 'https://blog.klabin.com.br/sustentabilidade',
241 'PRODUTOS': 'https://blog.klabin.com.br/produtos',
242 'NEGÓCIOS': 'https://blog.klabin.com.br/negocios'
243 }
244 function renderTemplate() {
245 var html = klabinSustentabilidadeData.reduce((acc, item, index) => {
246 acc += `
247 <div class="klb-blog-section-tag__item klb-card">
248 <img alt="Imagem do card" class="klb-card__imagem" src="`+item.image+`">
249 <a href="`+item.link+`" aria-label="`+item.title+`"><div class="klb-card__imagem-wrapper"></div></a>
250 <a class="klb-card__category href="`+_categories[item.category.toUpperCase()]+`"" aria-label="`+item.title+`">`+item.category+`</a>
251 <svg class="klb-card__detail" width="52" height="26" viewBox="0 0 52 26" fill="#D3DF78" xmlns="http://www.w3.org/2000/svg">
252 <path d="M24.8323 0.621826L0.45752 25.2281H27.6022L51.977 0.621826H24.8323Z"/>
253 </svg>
254 <a href="`+item.link+`" aria-label="`+item.title+`"><div class="klb-card__title">`+item.title+`</div></a>
255 <div class="klb-card__legend">
256 <div class="klb-card__time">tempo de leitura: `+item.time+`</div>
257 |
258 <div class="klb-card__share" data-link="`+item.link+`" data-title="`+item.title+`">compartilhe</div>
259 <svg data-link="`+item.link+`" data-title="`+item.title+`" width="10" height="11" viewBox="0 0 10 11" fill="#231F20" xmlns="http://www.w3.org/2000/svg">
260 <path d="M2.40089 7.85679C3.02304 7.8569 3.62053 7.62108 4.06652 7.19932L5.78323 8.18161C5.68523 8.8215 5.90811 9.46831 6.38298 9.92153C6.85785 10.3747 7.52704 10.5793 8.18318 10.472C8.83922 10.3646 9.40282 9.95828 9.69907 9.379C9.9952 8.79972 9.9883 8.11755 9.68023 7.54401C9.37228 6.97059 8.80054 6.57519 8.14236 6.48054C7.48419 6.38589 6.81926 6.60349 6.35375 7.06568L4.71544 6.13305C4.8276 5.73895 4.8276 5.32262 4.71544 4.92852L6.35375 3.99589C6.82693 4.47195 7.50617 4.69824 8.18004 4.60423C8.85391 4.51023 9.4405 4.10747 9.75692 3.52133C10.0734 2.93523 10.0813 2.23701 9.77822 1.64427C9.47518 1.05156 8.89784 0.636314 8.22631 0.527874C7.55467 0.419456 6.87041 0.63109 6.38663 1.09686C5.90286 1.56262 5.67842 2.22583 5.78309 2.87991L4.06649 3.85134C3.49363 3.31142 2.68216 3.08385 1.90168 3.24431C1.1212 3.40476 0.473874 3.93222 0.17483 4.65136C-0.124215 5.3705 -0.0357859 6.18722 0.410643 6.83015C0.857083 7.47296 1.60312 7.85787 2.40089 7.85679ZM7.83547 7.70131C8.04743 7.70131 8.2508 7.78328 8.40065 7.92899C8.55061 8.07471 8.63479 8.27235 8.63479 8.47846C8.63479 8.68457 8.55061 8.88233 8.40065 9.02804C8.2508 9.17376 8.04754 9.25562 7.83558 9.25562C7.62362 9.25562 7.42037 9.17376 7.2704 9.02804C7.12055 8.88233 7.03637 8.68457 7.03637 8.47846C7.03637 8.27236 7.12055 8.07471 7.2704 7.92899C7.42037 7.78328 7.62351 7.70131 7.83547 7.70131ZM7.83547 1.795C8.04743 1.795 8.2508 1.87696 8.40065 2.02267C8.55061 2.16839 8.63479 2.36615 8.63479 2.57226C8.63479 2.77836 8.55061 2.97601 8.40065 3.12173C8.2508 3.26744 8.04754 3.34941 7.83558 3.34941C7.62362 3.34941 7.42037 3.26744 7.2704 3.12173C7.12055 2.97601 7.03637 2.77837 7.03637 2.57226C7.03637 2.36615 7.12055 2.16839 7.2704 2.02267C7.42037 1.87696 7.62351 1.795 7.83547 1.795ZM2.40089 4.43738C2.69768 4.43738 2.98223 4.55198 3.19208 4.75601C3.40191 4.96005 3.51986 5.23673 3.51986 5.52536C3.51986 5.81398 3.4019 6.09065 3.19208 6.2947C2.98224 6.49875 2.69771 6.61334 2.40089 6.61334C2.10419 6.61334 1.81956 6.49874 1.60971 6.2947C1.39988 6.09066 1.28204 5.81398 1.28204 5.52536C1.28204 5.23673 1.39989 4.96007 1.60971 4.75601C1.81955 4.55196 2.10419 4.43738 2.40089 4.43738Z"/>
261 <path d="M2.40089 4.43738C2.69768 4.43738 2.98223 4.55198 3.19208 4.75601C3.40191 4.96005 3.51986 5.23673 3.51986 5.52536C3.51986 5.81398 3.4019 6.09065 3.19208 6.2947C2.98224 6.49875 2.69771 6.61334 2.40089 6.61334C2.10419 6.61334 1.81956 6.49874 1.60971 6.2947C1.39988 6.09066 1.28204 5.81398 1.28204 5.52536C1.28204 5.23673 1.39989 4.96007 1.60971 4.75601C1.81955 4.55196 2.10419 4.43738 2.40089 4.43738Z"/>
262 <path d="M7.83547 1.795C8.04743 1.795 8.2508 1.87696 8.40065 2.02267C8.55061 2.16839 8.63479 2.36615 8.63479 2.57226C8.63479 2.77836 8.55061 2.97601 8.40065 3.12173C8.2508 3.26744 8.04754 3.34941 7.83558 3.34941C7.62362 3.34941 7.42037 3.26744 7.2704 3.12173C7.12055 2.97601 7.03637 2.77837 7.03637 2.57226C7.03637 2.36615 7.12055 2.16839 7.2704 2.02267C7.42037 1.87696 7.62351 1.795 7.83547 1.795Z"/>
263 <path d="M7.83547 7.70131C8.04743 7.70131 8.2508 7.78328 8.40065 7.92899C8.55061 8.07471 8.63479 8.27235 8.63479 8.47846C8.63479 8.68457 8.55061 8.88233 8.40065 9.02804C8.2508 9.17376 8.04754 9.25562 7.83558 9.25562C7.62362 9.25562 7.42037 9.17376 7.2704 9.02804C7.12055 8.88233 7.03637 8.68457 7.03637 8.47846C7.03637 8.27236 7.12055 8.07471 7.2704 7.92899C7.42037 7.78328 7.62351 7.70131 7.83547 7.70131Z"/>
264 </svg>
265 </div>
266 <a href="`+item.link+`" aria-label="`+item.title+`"><div class="klb-card__description">`+item.description+`</div></a>
267 </div>
268 `;
269 return acc;
270 },'')
271
272 var element = $('.klb-blog-section-tag .klb-blog-section-tag__content');
273 element.html(html);
274 }
275
276 renderTemplate();
277 });
278</script>