Pular para o conteúdo
Um erro ocorreu enquanto processava o modelo.
Expression xPathSelector.selectSingleNode(rootElement) is undefined on line 37, column 34 in 20154#20194#25319.
1<#-- 
2	Nome:  
3	Estrutura:  
4	Idioma: Freemarker 
5	Descrição: 
6	Fazer cache:  
7	Data Alteração: 2022 11 03 
8	Tarefa:  
9	Obs.:    
10--> 
11<#if (serviceLocator.findService("com.liferay.portal.service.ReleaseLocalService"))?? > 
12<style> 
13.pagetitle-content input[type="text"] { 
14    color: #fff; 
15    background: rgba(255,255,255,0.3); 
16    border: 0; 
17    padding: 3px 5px; 
18    margin-top: 5px; 
19
20.lfr-token-list{display:none;} 
21.search-layout{display:none;} 
22.control-group{margin-bottom:0 !important;} 
23.pagetitle-content form{margin-bottom:0;display:-webkit-inline-box;margin-left: 20px;} 
24.pagetitle-content{padding:5px 0 0 !important;} 
25</style> 
26 
27<div class="news-list"> 
28	<#list entries as entry> 
29        <#assign renderer = entry.getAssetRenderer() > 
30        <#assign className = renderer.getClassName() > 
31        <#if className == "com.liferay.portlet.journal.model.JournalArticle" > 
32            <#assign journalArticle = renderer.getArticle() > 
33            <#assign document = saxReaderUtil.read(journalArticle.getContent()) > 
34            <#assign rootElement = document.getRootElement() > 
35			 
36            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='full_text']") > 
37            <#assign full_text = xPathSelector.selectSingleNode(rootElement).getStringValue() > 
38			 
39			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='slideshow']") > 
40            <#assign slideshow = xPathSelector.selectSingleNode(rootElement).getStringValue() > 
41             
42            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='full_image']") > 
43			<#assign full_img = xPathSelector.selectSingleNode(rootElement).getStringValue() > 
44			 
45			<#assign link = entry.getAssetRenderer().getURLViewInContext(renderRequest, renderResponse, '') /> 
46			<#assign date = journalArticle.displayDate?string["dd 'de' MMMM 'de' yyyy 'às' HH:mm"] > 
47			<#assign titulo = entry.getTitle(locale) /> 
48			 
49			<#if "assetLinkBehavior" != "showFullContent" > 
50                <#-- assign link = renderer.getURLViewInContext(renderRequest, renderResponse, link) --> 
51            </#if> 
52                         
53			<#if full_img?trim == "" > 
54                <div class="news-item"> 
55                    <p style="font-weight:200;margin:0;">${date} |  
56                    <span style="text-transform:uppercase;font-size: 14px;font-weight: 700;color: #5B689B;"> 
57                        <#list entry.getCategories() as cat> 
58							${cat.name} 
59							<#break> 
60						</#list> 
61                    </span> 
62                    <#if themeDisplay.isSignedIn() > 
63                        <span style="color:#888"> <i class="icon-eye-open"></i> ${entry.viewCount}</span> 
64                    </#if> 
65                    </p> 
66                    <h3 style="margin:0;"><a href="${link}" class="title" style="font-size:22px;">${titulo}</a></h3> 
67                </div> 
68            <#else> 
69                <div class="news-item" style="padding: 20px 0;"> 
70                    <p style="font-weight:200;margin:0;">${date} |  
71                    <span style="text-transform:uppercase;font-size: 14px;font-weight: 700;color: #5B689B;"> 
72                        <#list entry.getCategories() as cat> 
73							${cat.name} 
74							<#break> 
75						</#list> 
76                    </span> 
77                    <#if themeDisplay.isSignedIn() > 
78                        <span style="color:#888"> <i class="icon-eye-open"></i> ${entry.viewCount}</span> 
79                    </#if> 
80                    </p> 
81                    <div class="row-fluid"> 
82                        <div class="span3"><img src="${full_img?trim}&imageThumbnail=2" /></div> 
83                        <div class="span9"><h3 style="margin:0;"><a href="${link}" class="title" style="font-size: 22px;">${titulo}</a></h3></div> 
84                    </div> 
85                </div> 
86            </#if> 
87        </#if> 
88    </#list> 
89</div> 
90 
91<script> 
92    searchInterno(); 
93</script> 
94 
95<#else> 
96 
97<#assign dlFileEntryLocalService =  serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") > 
98<#setting url_escaping_charset="UTF-8"> 
99<style> 
100.pagetitle-content input[type="text"] { 
101    color: #fff; 
102    background: rgba(255,255,255,0.3); 
103    border: 0; 
104    padding: 3px 5px; 
105    margin-top: 5px; 
106
107.lfr-token-list{display:none;} 
108.search-layout{display:none;} 
109.control-group{margin-bottom:0 !important;} 
110.pagetitle-content form{margin-bottom:0;display:-webkit-inline-box;margin-left: 20px;} 
111.pagetitle-content{padding:5px 0 0 !important;} 
112</style> 
113<div class="news-list"> 
114	<#list entries as entry> 
115        <#assign renderer = entry.getAssetRenderer() > 
116        <#assign className = renderer.getClassName() > 
117        <#if className == "com.liferay.journal.model.JournalArticle" > 
118            <#assign journalArticle = renderer.getArticle() > 
119            <#assign document = saxReaderUtil.read(journalArticle.getContent()) > 
120            <#assign rootElement = document.getRootElement() > 
121			 
122            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='full_text']") > 
123            <#assign full_text = xPathSelector.selectSingleNode(rootElement).getStringValue() > 
124			 
125			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='slideshow']") > 
126            <#assign slideshow = xPathSelector.selectSingleNode(rootElement).getStringValue() > 
127             
128            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='full_image']") > 
129			<#assign full_img = xPathSelector.selectSingleNode(rootElement).getStringValue() > 
130			 
131			<#assign link = entry.getAssetRenderer().getURLViewInContext(renderRequest, renderResponse, '') /> 
132			<#assign date = journalArticle.displayDate?string["dd 'de' MMMM 'de' yyyy 'às' HH:mm"] > 
133			<#assign titulo = entry.getTitle(locale) /> 
134			 
135			<#if "assetLinkBehavior" != "showFullContent" > 
136                <#-- assign link = renderer.getURLViewInContext(renderRequest, renderResponse, link) --> 
137            </#if> 
138                         
139			<#if full_img?trim == "" > 
140			 
141                <div class="news-item"> 
142                    <p style="font-weight:200;margin:0;">${date} |  
143                    <span style="text-transform:uppercase;font-size: 14px;font-weight: 700;color: #5B689B;"> 
144                        <#list entry.getCategories() as cat> 
145							${cat.name} 
146							<#break> 
147						</#list> 
148                    </span> 
149                    <#if themeDisplay.isSignedIn() > 
150                        <span style="color:#888"> <i class="icon-eye-open"></i> ${entry.viewCount}</span> 
151                    </#if> 
152                    </p> 
153                    <h3 style="margin:0;"><a href="${link}" class="title" style="font-size:22px;">${titulo}</a></h3> 
154                </div> 
155            <#else> 
156 
157            <#assign  
158            imgJson = jsonFactoryUtil.createJSONObject(full_img) 
159            fileObject = dlFileEntryLocalService.fetchDLFileEntryByUuidAndGroupId(imgJson.uuid, imgJson.groupId) 
160            fileEntryId = fileObject.getFileEntryId() 
161            folderId = fileObject.getFolderId() 
162            fileName = fileObject.getFileName() 
163            full_image = "${themeDisplay.getURLPortal()}/documents/"+ imgJson.groupId +"/" +folderId +"/"+ fileName?url +"/"+imgJson.uuid />	             
164             
165                <div class="news-item" style="padding: 20px 0;"> 
166                    <p style="font-weight:200;margin:0;">${date} |  
167                    <span style="text-transform:uppercase;font-size: 14px;font-weight: 700;color: #5B689B;"> 
168                        <#list entry.getCategories() as cat> 
169							${cat.name} 
170							<#break> 
171						</#list> 
172                    </span> 
173                    <#if themeDisplay.isSignedIn() > 
174                        <span style="color:#888"> <i class="icon-eye-open"></i> ${entry.viewCount}</span> 
175                    </#if> 
176                    </p> 
177                    <div class="row-fluid"> 
178                        <div class="span3"><a href="${link!}"><img src="${full_image!}" class="img-fluid w-100"/></a></div> 
179                        <div class="span9"><h3 style="margin:0;"><a href="${link!}" class="title" style="font-size: 22px;">${titulo!}</a></h3></div> 
180                    </div> 
181                </div> 
182            </#if> 
183        </#if> 
184    </#list> 
185</div> 
186 
187<script> 
188    searchInterno(); 
189</script> 
190</#if>