Um erro ocorreu enquanto processava o modelo.
Java method "com.sun.proxy.$Proxy192.getGroupVocabularies(long)" threw an exception when invoked on com.sun.proxy.$Proxy192 object "com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl@790d9e4"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign vocabularies = assetVocabular...  [in template "20099#20135#12844422" at line 12, column 1]
----
1<#-- Conteúdo Web -> Templates: Site de Crise - Include de templates--> 
2<#-- include "${templatesPath}/1975602" --> 
3 
4<#-- Conteúdo Web -> Templates: Site de Crise - Funções gerais--> 
5<#include "${templatesPath}/1975398" /> 
6 
7<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
8<#assign fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] /> 
9<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
10<#assign assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyService") /> 
11<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
12<#assign vocabularies = assetVocabularyService.getGroupVocabularies(groupId) /> 
13<#assign editoriaVocabulary = findVocabulary("Editorial", vocabularies) /> 
14 
15<#assign searchCSS = "search_" + randomNumber(4586) /> 
16 
17<#function getFirstCategoryFromVocabulary entry vocabulary> 
18    <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", entry.getClassPK()) /> 
19    <#list categories as category> 
20        <#assign vocabulary = assetVocabularyService.getVocabulary(category.getVocabularyId()) /> 
21 
22        <#if vocabulary.getVocabularyId() == category.getVocabularyId()> 
23            <#return category> 
24        </#if> 
25    </#list> 
26    <#return ""> 
27</#function> 
28 
29<#assign cssRoot = "card-news_" + randomNumber(4586) /> 
30 
31<#-- Função para obter os dados de um card no Web Content (Journal Article) --> 
32<#function getCardData entry journalArticleLocalService fileEntryService > 
33 
34    <#assign editoria = getFirstCategoryFromVocabulary(entry, editoriaVocabulary) /> 
35    <#assign editoriaId = -1 /> 
36    <#if editoria?has_content> 
37        <#assign editoriaId = editoria.getCategoryId() /> 
38    </#if> 
39    <#if editoriaId == -1> 
40        <#return {} /> 
41    </#if> 
42 
43    <#assign journalArticle = journalArticleLocalService.getLatestArticle(entry.getClassPK()) /> 
44    <#assign ddmStructure = journalArticle.getDDMStructure() /> 
45    <#assign fieldList = getFieldListByStructure(ddmStructure) /> 
46    <#assign xmlArticle = journalArticle.getDocument().getRootElement() /> 
47    <#assign ddmStructure = journalArticle.getDDMStructure() /> 
48 
49    <#assign title = getFieldValue(fieldList, xmlArticle, "Título de destaque da notícia") /> 
50		 
51    <#assign lastPublishDate = journalArticle.getDisplayDate()> 
52    <#assign createDate = journalArticle.getCreateDate()>		 
53 
54    <#assign editoria = getFirstCategoryFromVocabulary(entry, editoriaVocabulary) /> 
55    <#assign editoriaId = -1 /> 
56    <#if editoria?has_content> 
57        <#assign editoriaId = editoria.getCategoryId() /> 
58        <#assign editoriaName = editoria.getTitle(locale) /> 
59    </#if> 
60 
61		<#assign urlNews = "/"> 
62		<#if themeDisplay.getPortalURL()?contains("webserver")> 
63			  <#assign urlNews = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + layout.getGroup().friendlyURL + "/w/" + journalArticle.getUrlTitle()> 
64		<#else> 
65					<#assign urlNews = "/w/" + journalArticle.getUrlTitle()> 
66		</#if>			     
67 
68    <#assign cardInfo =  { 
69    "title": title, 
70    "lastPublishDate": lastPublishDate, 
71    "createDate" : createDate, 
72    "editoriaId": editoriaId, 
73    "editoriaName": editoriaName, 
74    "urlNews": urlNews 
75		} /> 
76 
77 
78    <#return cardInfo /> 
79 
80</#function> 
81 
82<#macro renderCard cardData> 
83	 
84    <div class="card ${cssRoot}" category-id="${cardData.editoriaId}"> 
85        <div class="text-container"> 
86						<p class="editoria small-caps-lg">${cardData.editoriaName}</p> 
87						<a class="title h2 editorial-news-card-link" href="${cardData.urlNews}" >${cardData.title}</a> 
88						<div class="bar"></div> 
89						<div class="date"> 
90							 <p class="updated"> 
91            		 <#if locale?lower_case == "pt_br"> Publicado em <#else> Published in </#if> ${formatDate(cardData.lastPublishDate)} 
92							</p> 
93						</div> 
94        </div> 
95    </div> 
96 
97</#macro> 
98			 
99<#-- Renderizar Lista de cards --> 
100<#if entries?has_content> 
101<div class="${searchCSS} breakpoint"> 
102		<div class="quantify-results col-3-10 md-col-1-12 sm-col-1-4"> 
103         <div class="quantify-results-title"> 
104					 	<span class="quantify-results-title-text display-sm">  
105            		<#if locale?lower_case == "pt_br"> Editoria <#else> Editory </#if>  </span> 
106          	<div class="quantify-results-title-yellow-bar"></div> 
107         </div> 
108    </div> 
109		<div class="results col-3-10 md-col-1-12 sm-col-1-4"> 
110			<#list entries as entry> 
111					<#assign cardData = getCardData(entry journalArticleService fileEntryService) /> 
112				   
113					<@renderCard cardData/> 
114				 
115			</#list> 
116		</div> 
117	 
118	  <div class="petro-web-content-pagination col-3-10 md-col-1-12 sm-col-1-4"> 
119			<ul class="petro-web-content-pagination-container"> </ul> 
120	  </div> 
121 
122</div> 
123	 
124    <style> 
125			 
126    .${searchCSS} .quantify-results { 
127        padding: var(--space-xl) 0; 
128        font-family: var(--font-family-base, "Petrobras Sans"); 
129
130 
131    .${searchCSS} .quantify-results .quantify-results-title .quantify-results-title-text { 
132        display: block; 
133        word-wrap: break-word; 
134        line-height: var(--line-height-sm); 
135        color: var(--color-neutral-800); 
136
137 
138    .${searchCSS} .quantify-results .quantify-results-title .quantify-results-title-text .quantify-results-title-number { 
139        color: var(--color-primary-brand); 
140
141 
142    .${searchCSS} .quantify-results .quantify-results-title .quantify-results-title-yellow-bar { 
143        width: var(--size-xl); 
144        height: 4.1px; 
145        margin-top: 26px; 
146        background-color: var(--color-secondary-solid-to-bright-200, #FDC82F); 
147
148 
149    .${searchCSS} .quantify-results .quantify-results-subtitle { 
150        margin-top: var(--space-xxs); 
151
152 
153    .${searchCSS} .quantify-results .quantify-results-subtitle .quantify-results-subtitle-text { 
154        display: block; 
155        word-wrap: break-word; 
156        color: var(--color-neutral-700); 
157
158 
159    .${searchCSS} .results { 
160        padding-bottom: var(--space-xxxl); 
161        display: flex; 
162        flex-direction: column; 
163        gap: var(--space-lg); 
164
165 
166    .${searchCSS} .result { 
167        max-height: initial; 
168        height: auto; 
169
170 
171    @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) { 
172        .${searchCSS} .quantify-results .quantify-results-title .quantify-results-title-yellow-bar { 
173            width: var(--size-lg); 
174            height: 3.5px; 
175
176 
177        .${searchCSS} .results { 
178            gap: var(--space-sm); 
179
180
181        .${cssRoot} { 
182            display: flex; 
183            gap: var(--space-md); 
184            border-radius: var(--border-radius-lg); 
185            border: 1px solid var(--color-neutral-400, #EEE); 
186            background: var(--color-neutral-100, #FFF); 
187
188 
189        .${cssRoot}:hover { 
190            box-shadow: var(--box-shadow-neutral); 
191            transition: box-shadow 300ms ease-in-out; 
192
193 
194        .${cssRoot} .img-container { 
195            height: 100%; 
196
197 
198        .${cssRoot} .img-container img { 
199            width: 304px; 
200            height: 100%; 
201            border-radius: var(--space-sm) var(--space-none) var(--space-none) var(--space-sm); 
202            object-fit: cover; 
203
204 
205        .${cssRoot} .text-container { 
206					  border-radius: var(--border-radius-lg); 
207					  background: var(--color-background-card); 
208            width: 100%; 
209            padding: var(--space-md); 
210            display: flex; 
211            flex-direction: column; 
212            gap: var(--space-xxs, 8px); 
213					  color: var(--color-neutral-800, #373737); 
214
215 
216			.${cssRoot} .text-container a { 
217					  color: var(--color-neutral-800, #373737); 
218
219			 
220        .${cssRoot} .text-container .editoria { 
221            color: var(--color-neutral-800, #373737); 
222    				font-weight: var(--font-weight-regular); 
223
224 
225        .${cssRoot} .text-container .card-title { 
226            color: var(--color-neutral-800, #373737); 
227            margin: 0; 
228
229 
230        .${cssRoot} .text-container .date, 
231        .${cssRoot} .text-container .date .updated, 
232        .${cssRoot} .text-container .date .published { 
233            color: var(--color-neutral-800, #373737); 
234            font-family: var(--font-family-base); 
235            font-size: var(--font-size-xxs); 
236            font-style:  var(--font-style-normal); 
237            font-weight: var(--font-weight-regular); 
238            line-height: var(--line-height-xl); /* 25.6px */ 
239            margin: var(--space-none); 
240
241 
242        .${cssRoot} .text-container .bar { 
243            width: var(--size-xl); 
244            height: 4.1px; 
245            margin-top: var(--space-md); 
246            background-color: var(--color-secondary-solid-to-bright-200, #FDC82F); 
247
248 
249        .${cssRoot} .text-container .date { 
250
251 
252        .${cssRoot} .text-container .media-link-container { 
253            display: flex; 
254            flex-direction: row; 
255            align-items: center; 
256            justify-content: space-between; 
257            padding-top: var(--size-xs); 
258
259 
260        .${cssRoot} .text-container .media-link-container .media-category-title-container { 
261            display: flex; 
262            gap: var(--size-micro); 
263            align-items: center; 
264            justify-content: center; 
265            border-radius: 100px; 
266            padding: var(--space-none) var(--space-xs); 
267            border: 1px solid var(--neutrals-grayscale-400, #EEE); 
268            background: var(--neutrals-grayscale-200, #FBFBFB); 
269            height: 32px; 
270
271 
272        .${cssRoot} .text-container .media-link-container .media-category-title-container svg { 
273            max-width: var(--size-xs, 16px); 
274            width: var(--size-xs, 16px); 
275
276 
277        .${cssRoot} .text-container .media-link-container .media-category-title-container .title { 
278            color: var(--neutral-700, #525252); 
279            font-family: var(--font-family-base); 
280            font-size: var(--font-size-xxxs); 
281            font-style: var(--font-style-normal); 
282            font-weight: var(--font-weight-regular); 
283            line-height: var(--line-height-xl); 
284            margin: var(--space-none); 
285
286 
287        .${cssRoot} .text-container .media-link-container .download { 
288            color: var(--color-primary-medium, #008542); 
289            font-family: var(--font-family-base); 
290            font-size: var(--font-size-xxxs); 
291            font-style:  var(--font-style-normal); 
292            font-weight: var(--font-weight-bold); 
293            line-height: var(--line-height-lg); 
294            text-decoration-line: var(--text-decoration-underline); 
295            display: flex; 
296            gap: var(--space-xxs); 
297            align-items: center; 
298
299 
300        .${cssRoot} .text-container .media-link-container .download svg { 
301            width: 18px !important; 
302            height: 18px; 
303
304 
305        @media screen and (max-width: 742px) { 
306            .${cssRoot} { 
307                flex-direction: column; 
308                gap: var(--space-none); 
309
310 
311            .${cssRoot} .img-container img { 
312                width: 100%; 
313                height: 154px; 
314                border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0; 
315                object-fit: cover; 
316
317 
318            .${cssRoot} .text-container { 
319                padding: var(--space-md); 
320                gap: var(--space-xxs); 
321
322 
323            .${cssRoot} .text-container .bar { 
324                margin: var(--space-sm) var(--space-none); 
325
326 
327            .${cssRoot}  .text-container .media-link-container .media-category-title-container .title { 
328                font-size: var(--font-size-micro); 
329
330 
331            .${cssRoot} .text-container .media-link-container .media-category-title-container svg { 
332                width: var(--size-xs, 16px); 
333
334 
335            .${cssRoot} .text-container .media-link-container .media-category-title-container { 
336                gap: var(--size-micro); 
337                padding: var(--space-xxxs) var(--space-xxs); 
338                height: var(--size-md, 24px); 
339
340 
341            .${cssRoot} .text-container .media-link-container .download { 
342                font-size: var(--font-size-micro); 
343
344
345			 
346				.${searchCSS} .petro-web-content-pagination { 
347						display: flex; 
348					  justify-content: center; 
349					  height: 80px; 
350					  width: 100%; 
351
352			 
353				.${searchCSS} .petro-web-content-pagination ul { 
354						display: flex; 
355						justify-content: center; 
356					  height: 80px; 
357					  width: 100%; 
358					  list-style-type: none; 
359						gap: var(--space-sm); 
360
361			 
362				.${searchCSS} .petro-web-content-pagination ul li { 
363							text-decoration: none; 
364							outline: none; 
365							display: flex; 
366							align-items: center; 
367							justify-content: center; 
368							width: var(--size-lg); 
369							height: var(--size-lg); 
370							color: var(--color-primary-solid-to-bright-100, var(--color-primary-medium)); 
371							border-radius: 16px; 
372							border: var(--border-width-heavy) solid transparent; 
373							border-color: transparent; 
374							transition: border-color 300ms ease-in-out; 
375
376			 
377				.${searchCSS} .petro-web-content-pagination ul li:hover { 
378						border-color: var(--color-primary-solid-to-bright-200, var(--color-primary-medium)); 
379
380			 
381				.${searchCSS} .petro-web-content-pagination ul li a { 
382						text-decoration: none; 
383						outline: none; 
384						display: flex; 
385						align-items: center; 
386						justify-content: center; 
387						width: var(--size-lg); 
388						height: var(--size-lg); 
389						color: var(--color-primary-solid-to-bright-100, var(--color-primary-medium)); 
390						border-radius: 16px; 
391						border: var(--border-width-heavy) solid transparent; 
392						border-color: transparent; 
393						transition: border-color 300ms ease-in-out; 
394
395			 
396				.${searchCSS} .petro-web-content-pagination ul li.collapse { 
397					display: none; 
398
399			 
400				.${searchCSS} .petro-web-content-pagination ul li.active { 
401						background-color: var(--color-primary-solid-to-bright-200, var(--color-primary-medium)); 
402						color: var(--color-neutral-bright-to-dark-100, #FFF); 
403						pointer-events: none; 
404
405			 
406				.${searchCSS} .petro-web-content-pagination ul li.active a { 
407						color: var(--color-neutral-bright-to-dark-100, #FFF); 
408
409			 
410				.clearfix.lfr-pagination { 
411						display: none; 
412
413			 
414    </style> 
415	 
416	  <script> 
417			 
418			// Pagination Web Content Liferay 
419			const paginationContainer = document.querySelector('.${searchCSS} .petro-web-content-pagination ul'); 
420			 
421			const searchParams = new URLSearchParams(window.location.href); 
422			console.log(searchParams.get("_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_sqpu_cur")); 
423			 
424			let currentPage = 1; 
425			if (searchParams.get("_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_sqpu_cur")) { 
426				currentPage = searchParams.get("_com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_sqpu_cur"); 
427
428				 
429			AUI().ready(function () { 
430				const pagination = document.querySelectorAll('ul.dropdown-menu.lfr-menu-list li'); 
431				 
432				const nextBackPagination = document.querySelectorAll('.clearfix.lfr-pagination .lfr-pagination-buttons.pagination li'); 
433				console.log(pagination, nextBackPagination); 
434				 
435				const backPagination = nextBackPagination[1].cloneNode(true); 
436				const nextPagination = nextBackPagination[2].cloneNode(true); 
437				 
438				backPagination.querySelector('a').innerHTML = ` 
439				<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M10 4L6 8L10 12" stroke="#010101" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"></path> 
440          </svg>` 
441				 
442				nextPagination.querySelector('a').innerHTML = ` 
443				<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6 12L10 8L6 4" stroke="#010101" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"></path> 
444          </svg>` 
445				 
446				paginationContainer.appendChild(backPagination);  
447				 
448				pagination.forEach((paginationItem) => { 
449					const paginationItemClone = paginationItem.cloneNode(true); 
450					paginationContainer.appendChild(paginationItemClone);  
451				}) 
452				 
453				paginationContainer.appendChild(nextPagination);  
454				 
455				 
456				const paginationContainerItems = document.querySelectorAll('.${searchCSS} .petro-web-content-pagination ul li'); 
457				 
458				paginationContainerItems.forEach((item, index) => { 
459					index === +currentPage ? item.classList.add('active') : item.classList.remove('active'); 
460					 
461					if (paginationContainerItems.length  >  7) { 
462						(index < +currentPage - 2 || index > +currentPage + 2) && (index != 0 && index != paginationContainerItems.length - 1)  ? item.classList.add('collapse') : item.classList.remove('collapse'); 
463
464					 
465					item.querySelector('a').classList.remove('dropdown-item'); 
466				}) 
467				 
468			}) 
469			/////////////////////////////////// 
470			 
471	  </script> 
472	 
473</#if> 




Canais

Idioma

Acessibilidade

Faça uma busca:

Buscar

Sugestões de busca

Link de exemplo
Ícone do botão Button Label
Ícone de carregamento

Mais pesquisados

Preço dos combustíveis

Pré-Sal

Time Petrobras

Escolha um canal:

Acessibilidade:

Alto-Contraste

Desligado

Ligado

Texto Grande

Desligado

Ligado

Idioma:

Selecione um idioma: