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

Projetos

Nossa empresa tem orgulho de apoiar iniciativas que contribuem para o bem-estar social e ambiental. Confira:

Linha de atuação

Projeto

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

Os resultados da busca aparecerão aqui

É só filtrar, conferir as informações e acessar os projetos.

Os resultados da busca aparecerão aqui

É só filtrar, conferir as informações e acessar os projetos.

Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> assetVocabularyLocalService.fetchGroupVocabulary(groupId, "Ano")  [in template "20099#20135#7806175" at line 37, column 27]

----
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: #assign yearVocabulary = assetVocabul...  [in template "20099#20135#7806175" at line 37, column 1]
----
1<#-- Conteúdo Web -> Templates: Funções gerais--> 
2<#include "${templatesPath}/1975398" /> 
3 
4<#-- Conteúdo Web -> Templates: Render - Lista de resultados - Socio ambiental e Projetos Culturais --> 
5<#-- include "${templatesPath}/3034580" --> 
6 
7<#-- Conteúdo Web -> Templates: ExtrairInfo - Lista de resultados - Socio ambiental e Projetos Culturais --> 
8<#-- include "${templatesPath}/3034586" --> 
9 
10<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
11<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")> 
12<#assign fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] /> 
13<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
14<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
15 
16<#function removeSpecialCharacters text> 
17    <#attempt> 
18        <#assign anchor = text?lower_case /> 
19        <#assign anchor = anchor?replace('<^a-zA-Zs0-9>', ' ', 'r') /> 
20        <#assign anchor = anchor?trim /> 
21        <#assign anchor = anchor?replace('< >{1,}', '', 'r')  /> 
22        <#return anchor /> 
23        <#recover> 
24            <#return "" /> 
25    </#attempt> 
26</#function> 
27 
28<#function fetchGroupVocabulary vocabularyName assetVocabularyLocalService> 
29    <#assign result  = "" /> 
30    <#assign groupVocabularies = assetVocabularyLocalService.getGroupVocabularies(groupId) /> 
31    <#list groupVocabularies?filter(voc -> (removeSpecialCharacters(voc.getTitle(locale)) == removeSpecialCharacters(vocabularyName))) as vocabulary> 
32        <#assign result = vocabulary /> 
33    </#list> 
34    <#return result> 
35</#function> 
36 
37<#assign yearVocabulary = assetVocabularyLocalService.fetchGroupVocabulary(groupId, "Ano") /> 
38<#assign cityVocabulary = assetVocabularyLocalService.fetchGroupVocabulary(groupId, "Municipio") /> 
39<#assign lineActionVocabulary = fetchGroupVocabulary("Socio amb - Linha de atuacao", assetVocabularyLocalService) /> 
40<#assign classNumber = randomNumber (10) /> 
41 
42<#assign allStates = {}/> 
43<#assign allLineActions = {}/> 
44 
45<#assign projects = {} /> 
46 
47<#if entries?has_content> 
48    <#assign index = 0/> 
49    <#assign fieldMap = {"reviewInWebContent":"Resumo", 
50    "linkFieldSetIdInWebContent":"Fieldset79221789", 
51    "linkGroupLabelInWebContent":"Rótulo do grupo de links", 
52    "linkLabelInWebContent":"Rótulo do link", 
53    "externUrlLabelInWebContent":"URL externa de Sócio ambiental", 
54    "siteUrlLayoutIdInWebContent":"LinkToLayout43296778" 
55    }/> 
56    <#list entries as curEntry> 
57 
58        <#assign info = extractInfo(curEntry fieldMap yearVocabulary cityVocabulary lineActionVocabulary journalArticleService layoutLocalService fileEntryService assetCategoryLocalService) /> 
59        <#if info.infoList?size gt 0 > 
60            <@renderInfo info.infoList index info.hashCode/> 
61            <#assign index += 1/> 
62        </#if> 
63    </#list> 
64 
65    <script id="states-json" type="text/json"> 
66     ${jsonFactoryUtil.createJSONObject(allStates)} 
67  </script> 
68 
69    <script id="line-action-json" type="text/json"> 
70     ${jsonFactoryUtil.createJSONObject(allLineActions)} 
71  </script> 
72 
73    <script id="projects-json" type="text/json"> 
74     ${jsonFactoryUtil.createJSONObject(projects)} 
75  </script> 
76 
77</#if> 
78 
79 
80 
81<#-- 
82	Template para extrarir informações de itens de webcontent de Socio ambiental e Projetos Culturais. 
83	**************************************************************************************************************************** 
84	****************************OBS.: NAO DEFINA A ESTRUTURA DO WEBCONTENT PARA ESSE TEMPLATE.********************************** 
85	**************************************************************************************************************************** 
86	curEntry - Item de AssetEntry do qual o JournalArticle deverá ser busacdo.} 
87	journalArticleService: Instância de serviço para busca de JournalArticle (com.liferay.journal.service.JournalArticleLocalService) 
88	fieldMap: Mapa com os campos a serem extraídos do XML do JournalArticle 
89	reviewInWebContent - Rótulo do campo de Resumo 
90	linkFieldSetIdInWebContent - Identificador do grupo campo de campos dos links 
91	linkLabelInWebContent - Rótulo do campo de link 
92	externUrlLabelInWebContent - Rótulo do campo de url externa 
93	siteUrlLayoutIdInWebContent - Identificador do campo de link interno/página do site. --> 
94 
95<#function extractInfo curEntry fieldMap yearVocabulary cityVocabulary lineActionVocabulary journalArticleService layoutLocalService fileEntryService assetCategoryLocalService> 
96    <#if (!fieldMap["reviewInWebContent"]??)> 
97        <#return [] /> 
98    </#if> 
99    <#if (!fieldMap["linkFieldSetIdInWebContent"]??)> 
100        <#return [] /> 
101    </#if> 
102    <#if (!fieldMap["linkLabelInWebContent"]??)> 
103        <#return [] /> 
104    </#if> 
105    <#if (!fieldMap["externUrlLabelInWebContent"]??)> 
106        <#return [] /> 
107    </#if> 
108    <#if (!fieldMap["siteUrlLayoutIdInWebContent"]??)> 
109        <#return [] /> 
110    </#if> 
111    <#if (!fieldMap["linkGroupLabelInWebContent"]??)> 
112        <#return [] /> 
113    </#if> 
114    <#if !curEntry??> 
115        <#return [] /> 
116    </#if> 
117    <#assign article=journalArticleService.getLatestArticle(curEntry.getClassPK()) /> 
118    <#if !article??> 
119        <#return [] /> 
120    </#if> 
121    <#assign ddmStructure=article.getDDMStructure() /> 
122    <#if !ddmStructure??> 
123        <#return [] /> 
124    </#if> 
125 
126    <#assign stateIds={} /> 
127    <#assign lineActionIds = []/> 
128    <#assign allCategories=assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()) /> 
129    <#list allCategories as cat> 
130        <#if cat.getVocabularyId()==cityVocabulary.getVocabularyId()> 
131            <#if cat.isRootCategory()> 
132                <#assign stateIds += {cat.getCategoryId(): []} /> 
133                <#assign allStates += {cat.getTitle(locale): {"id": cat.getCategoryId(), "cities": {}}} /> 
134            <#else> 
135                <#assign parentTitle = cat.getParentCategory().getTitle(locale)/> 
136                <#assign parentId = cat.getParentCategory().getCategoryId() + "" /> 
137                <#if stateIds[parentId]??> 
138                    <#assign articleCityIds = stateIds[parentId] /> 
139                    <#assign articleCityIds += [cat.getCategoryId()] /> 
140                    <#assign stateIds += {cat.getCategoryId(): articleCityIds} /> 
141                <#else> 
142                    <#assign stateIds += {cat.getCategoryId(): [cat.getCategoryId()]} /> 
143                </#if> 
144                <#if allStates[parentTitle]??> 
145                    <#assign info = allStates[parentTitle] /> 
146                    <#assign infoCities = info.cities /> 
147                    <#assign infoCities += {cat.getCategoryId() + "" : cat.getTitle(locale)} /> 
148                    <#assign allStates += {parentTitle: {"id": info.id, "cities": infoCities}} /> 
149                <#else> 
150                    <#assign allStates += {parentTitle: {"id": cat.getCategoryId(), "cities": {cat.getCategoryId() + "": cat.getTitle(locale)}}} /> 
151                </#if> 
152            </#if> 
153        </#if> 
154        <#if cat.getVocabularyId()==lineActionVocabulary.getVocabularyId()> 
155            <#assign lineActionIds += [cat.getCategoryId()] /> 
156            <#assign allLineActions += {cat.getCategoryId() : cat.getTitle(locale)}/> 
157        </#if> 
158    </#list> 
159    <#assign fieldList=getFieldListByStructure(ddmStructure) /> 
160    <#assign xmlArticle=article.getDocument().getRootElement() /> 
161    <#assign title=article.getTitle(locale) /> 
162    <#assign review=getFieldValue(fieldList, xmlArticle, fieldMap.reviewInWebContent) /> 
163    <#assign linkGroupLabel=getFieldValue(fieldList, xmlArticle, fieldMap.linkGroupLabelInWebContent) /> 
164    <#assign projectImage="" /> 
165    <#if fieldMap.imageInWebContent?has_content> 
166        <#assign projectImage=getFileFromXML(fieldMap.imageInWebContent, xmlArticle, fileEntryService) /> 
167    </#if> 
168    <#assign linkNodeGroups=getNodes(fieldMap.linkFieldSetIdInWebContent, xmlArticle) /> 
169    <#assign linkInfos=[] /> 
170    <#list linkNodeGroups as linkNodeGroup> 
171        <#assign linkLabel=getFieldValue(fieldList, linkNodeGroup, fieldMap.linkLabelInWebContent) /> 
172        <#assign externUrl=getFieldValue(fieldList, linkNodeGroup, fieldMap.externUrlLabelInWebContent) /> 
173        <#assign siteUrl=getPageLayoutLinkFromXML(fieldMap.siteUrlLayoutIdInWebContent, linkNodeGroup, layoutLocalService) /> 
174        <#assign linkInfos=linkInfos + [{"label": linkLabel, "externUrl": externUrl, "siteUrl": siteUrl}] /> 
175    </#list> 
176 
177    <#assign projects += {article.hashCode(): {"title" : article.getTitle(locale), "stateIds" : stateIds, "lineActionIds" : lineActionIds} } /> 
178    <#return {"infoList": [{"title": title, "review": review, "linkGroupLabel":linkGroupLabel, "linkList": linkInfos, "projectImage": projectImage}], 
179    "hashCode" : article.hashCode()} /> 
180</#function> 
181 
182 
183 
184 
185<#macro renderInfo infoList index entryHashCode> 
186    <div class="project" search-id="${entryHashCode}" > 
187        <#list infoList as infos> 
188            <div> 
189                <#if infos.projectImage?has_content> 
190                    <img src="${infos.projectImage.url}"/> 
191                </#if> 
192            </div> 
193            <div class="breakpoint project-${classNumber}" index="${index}"> 
194                <div class="project-wrapper col-4-9 md-col-2-7 sm-col-1-4"> 
195                    <div class="title"> 
196                        <h2 class="h2">${infos.title}</h2> 
197                        <h2 class="h2 line">—</h2> 
198                    </div> 
199                    <div class="richText-content paragraph-md-regular">${infos.review}</div> 
200                </div> 
201                <div class="links-wrapper col-4-9 md-col-2-7 sm-col-1-4"> 
202                    <p class="title paragraph-md-bold">${infos.linkGroupLabel}</p> 
203                    <div class="links"> 
204                        <@renderLinks infos.linkList/> 
205                    </div> 
206                </div> 
207            </div> 
208        </#list> 
209    </div> 
210</#macro> 
211 
212<#macro renderLinks linkList> 
213    <#list linkList as linkInfo> 
214        <#assign url = ""/> 
215        <#if linkInfo.externUrl?has_content> 
216            <#assign url = linkInfo.externUrl/> 
217        <#else> 
218            <#if linkInfo.siteUrl?has_content> 
219                <#assign url = linkInfo.siteUrl/> 
220            </#if> 
221        </#if> 
222        <div class="link"> 
223            <div class="svg"> 
224                <svg xmlns="http://www.w3.org/2000/svg" width="14" height="9" viewBox="0 0 14 9" fill="none"> 
225                    <path d="M1.08984 8.24516V1.60376C1.08984 1.44364 1.15211 1.29007 1.26294 1.17684C1.37377 1.06361 1.52408 1 1.68082 1H8.77253M8.77253 1L12.9094 5.22634M8.77253 1L8.77252 5.22634H12.9094M12.9094 5.22634V8.24516" stroke="#959595" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 
226                </svg> 
227                <svg xmlns="http://www.w3.org/2000/svg" width="21" height="10" viewBox="0 0 21 10" fill="none"> 
228                    <path d="M1.752 4.9738H2.664C2.912 4.9738 3.124 4.9538 3.3 4.9138C3.476 4.8738 3.62 4.8058 3.732 4.7098C3.852 4.6058 3.94 4.4658 3.996 4.2898C4.052 4.1138 4.08 3.8938 4.08 3.6298C4.08 3.1098 3.968 2.7578 3.744 2.5738C3.528 2.3898 3.168 2.2978 2.664 2.2978H1.752V4.9738ZM0 9.6538V0.893799H2.784C3.856 0.893799 4.632 1.1218 5.112 1.5778C5.6 2.0258 5.844 2.6978 5.844 3.5938C5.844 4.4738 5.604 5.1578 5.124 5.6458C4.652 6.1338 3.872 6.3778 2.784 6.3778H1.752V9.6538H0Z" fill="#008542"/> 
229                    <path d="M8.84016 8.1418H9.94416C10.2962 8.1418 10.6042 8.1018 10.8682 8.0218C11.1322 7.9418 11.3482 7.7978 11.5162 7.5898C11.6922 7.3738 11.8242 7.0818 11.9122 6.7138C12.0002 6.3378 12.0442 5.8538 12.0442 5.2618C12.0442 4.6778 12.0002 4.2018 11.9122 3.8338C11.8322 3.4578 11.7042 3.1658 11.5282 2.9578C11.3602 2.7498 11.1442 2.6058 10.8802 2.5258C10.6242 2.4458 10.3202 2.4058 9.96816 2.4058H8.84016V8.1418ZM7.16016 9.6538V0.893799H10.1002C10.7642 0.893799 11.3322 0.981799 11.8042 1.1578C12.2762 1.3258 12.6602 1.5898 12.9562 1.9498C13.2602 2.3018 13.4802 2.7498 13.6162 3.2938C13.7602 3.8298 13.8322 4.4698 13.8322 5.2138C13.8322 6.7258 13.5362 7.8458 12.9442 8.5738C12.3522 9.2938 11.3882 9.6538 10.0522 9.6538H7.16016Z" fill="#008542"/> 
230                    <path d="M15.2695 9.6538V0.893799H20.2735V2.3578H16.9735V4.5898H19.9015V6.0538H16.9735V9.6538H15.2695Z" fill="#008542"/> 
231                </svg> 
232            </div> 
233            <a class="link-md" href="${url}">${linkInfo.label}</a> 
234        </div> 
235    </#list> 
236</#macro> 
237 
238<style> 
239    .project-${classNumber} { 
240        padding: var(--space-xl) 0; 
241        gap: var(--space-xl, 40px); 
242        box-sizing: border-box; 
243        border: none; 
244        font-family: var(--font-family-base, "Petrobras Sans"), sans-serif; 
245
246    .project-${classNumber} * :not(.breakpoint) :not(.richText-content *) { 
247        padding: var(--spacing-space-none, 0px); 
248        margin: var(--spacing-space-none, 0px); 
249        border: none; 
250        font-family: var(--font-family-base, "Petrobras Sans"), sans-serif; 
251
252    .project-${classNumber} 
253    .project-wrapper { 
254        display: flex; 
255        padding: var(--spacing-space-none, 0px); 
256        flex-direction: column; 
257        gap: var(--spacing-space-lg, 32px); 
258
259 
260    .project-${classNumber} 
261    .project-wrapper 
262    .richText-content { 
263        color: var(--color-neutral-800) 
264
265 
266    .project-${classNumber} 
267    .project-wrapper 
268    .title { 
269        display: flex; 
270        flex-direction: column; 
271        align-items: flex-start; 
272        align-self: stretch; 
273
274    .project-${classNumber} 
275    .project-wrapper 
276    .title 
277    .h2 { 
278        color: var(--color-neutral-800); 
279
280    .project-${classNumber} 
281    .project-wrapper 
282    .title 
283    .h2.line { 
284        color: var(--brand-secondary-medium, var(--color-secondary-medium, #FDC82F)); 
285
286 
287    .project-${classNumber} 
288    .links-wrapper { 
289        display: flex; 
290        flex-direction: column; 
291        gap: var(--spacing-space-lg, 32px); 
292
293 
294    .project-${classNumber} 
295    .links-wrapper { 
296        display: none; 
297
298 
299    .project-${classNumber} 
300    .links-wrapper 
301    .title { 
302        color: var(--color-neutral-800); 
303
304 
305    .project-${classNumber} 
306    .links-wrapper 
307    .links { 
308        display: flex; 
309        flex-direction: column; 
310        gap: var(--spacing-space-md, 24px); 
311        align-self: stretch; 
312
313    .project-${classNumber} 
314    .links-wrapper 
315    .links 
316    .link { 
317        display: flex; 
318        padding: var(--spacing-space-xxxs, 4px) 0px; 
319        align-items: center; 
320        gap: var(--spacing-space-xs, 12px); 
321        align-self: stretch; 
322
323    .project-${classNumber} 
324    .links-wrapper 
325    .links 
326    .link 
327    .svg { 
328        display: flex; 
329        width: 24px; 
330        height: 24px; 
331        padding: 1px 1.726px 3.346px 2px; 
332        flex-direction: column; 
333        justify-content: center; 
334        align-items: center; 
335        gap: 3.649px; 
336
337    .project-${classNumber} 
338    .links-wrapper 
339    .links 
340    .link 
341    a { 
342        color: var(--brand-primary-medium, var(--color-primary-medium, #008542)); 
343
344</style> 
345 
346<script> 
347    <#assign setHTMLTags = "setHTMLTags${classNumber}" /> 
348    AUI().ready(() => { 
349 
350        function ${setHTMLTags}() { 
351            const fragmentElements = document.querySelectorAll('.project-${classNumber}'); 
352 
353            if (fragmentElements.length !== 0) { 
354                fragmentElements.forEach(fragmentElement => { 
355                    const richTextContent = fragmentElement.querySelector('.richText-content'); 
356                    const linksWrapper = fragmentElement.querySelector('.links-wrapper'); 
357                    const links = richTextContent.querySelectorAll('a'); 
358 
359                    if (links.length === 0) { 
360                      linksWrapper && (linksWrapper.classList.add('hide-links-wrapper')); 
361                    } else { 
362                      links.forEach(link => link.classList.add('link-md')); 
363
364 
365                    const paragraphs = richTextContent.querySelectorAll('p'); 
366                    paragraphs && paragraphs.forEach(paragraph => paragraph.classList.add('paragraph-md-regular')); 
367                }); 
368
369
370 
371        ${setHTMLTags}(); 
372 
373    }) 
374</script> 

Sua busca não encontrou nenhum resultado.

Utilize outro filtro ou outra combinação de filtros.

Os resultados da busca aparecerão aqui

É só filtrar, conferir as informações e acessar os projetos.

Faça uma busca:

Buscar

Sugestões de busca

Link do botão
Ícone do botão Exibir mais resultados
Ícone de carregamento

Mais pesquisados

Preço dos combustíveis

Pré-Sal

Time Petrobras





Um inesperado erro ocorreu.
Um inesperado erro ocorreu.
Um inesperado erro ocorreu.
Um inesperado erro ocorreu.
Um inesperado erro ocorreu.