¿Qué lograrás12?
subtitulo 01
parrafo 01
Formación
Java method "com.sun.proxy.$Proxy1016.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy1016 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@3b390b12"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign article = JournalArticleLocal... [in template "97#123#29285" at line 115, column 3] ----
1<#--
2Web content templates are used to lay out the fields defined in a web
3content structure.
4
5Please use the left panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8<style>
9.bannercta .container {
10 height: 100%;
11}
12
13.bannercta .container .row{
14 height: 100%;
15}
16.bannercta .container .row .col-12.col-md-10.col-xl-10.mx-auto.text-center{
17 margin: auto;
18}
19.bannercta article {
20 display: inline-block;
21 vertical-align: middle;
22}
23
24.bannercta h1 {
25 font-family: 'Degular-Semibold';
26 font-size: 3.5em;
27
28
29}
30.bannercta .lead {
31 color: white;
32 font-family: 'Degular-Medium';
33 font-size: 1.9em;
34}
35a#ctlink {
36 color: #42b4e3;
37 font-family: 'Degular-Bold';
38 font-size: 1.6em;
39 text-transform: uppercase;
40
41}
42a#ctlink:hover {
43
44 text-decoration: none;
45}
46
47.bannercta .lead p {
48 font-family: 'Degular-Semibold';
49 font-size: 1.2em!important;
50 line-height: 38.4px
51}
52
53@media only screen and (min-width: 1920px) {
54 .bannercta .container{ max-width: 1920px;}
55
56}
57
58@media only screen and (max-width: 768px) {
59.bannercta .container {
60 height: 100%;
61}
62
63.bannercta .container .row{
64 height: 100%;
65}
66
67.bannercta .container .row .text-center{
68 margin: auto;
69}
70
71.bannercta article {
72 display: inline-block;
73 vertical-align: middle;
74}
75
76.bannercta h1 {
77 font-size: 2.4em;
78 font-family: 'Degular-Semibold';
79
80}
81.bannercta{
82height: 768px;
83/*background-position: 25% 15%!important;*/
84background-position: 80% 0!important;
85
86}
87a#ctlink {
88font-size: 1.4em;
89 color: white;
90}
91a#ctlink i {
92 display: block;
93}
94.lead p{
95 display: none;
96}
97
98}
99@media only screen and (max-width: 514px) {
100
101}
102
103</style>
104
105<#if themeDisplay?? >
106 <#attempt>
107 <#assign instancecta2 = themeDisplay.getPortletDisplay().getInstanceId() >
108 <#recover>
109 <#assign instancecta2 = "test" >
110 </#recover>
111 </#if>
112
113 <#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
114<#if Contenido.getData()?has_content>
115 <#assign article = JournalArticleLocalService.getLatestArticle(Contenido.getData()?number )>
116
117 <#assign document = saxReaderUtil.read(article.getContentByLocale(locale)) />
118 <#assign root = document.getRootElement()>
119 <#assign tag = root.selectSingleNode("dynamic-element[@name='tag']/dynamic-content").getText()/>
120 <#assign seccion = root.selectSingleNode("dynamic-element[@name='seccion']/dynamic-content").getText()/>
121 <#assign titulo = root.selectSingleNode("dynamic-element[@name='titulo']/dynamic-content").getText()/>
122 <#assign abstract = root.selectSingleNode("dynamic-element[@name='abstract']/dynamic-content").getText()/>
123 <#assign img = root.selectSingleNode("dynamic-element[@name='img']/dynamic-content").getText()/>
124
125
126 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='img']")>
127 <#assign imgNews = xPathSelector.selectSingleNode(root).getStringValue()>
128
129 <#if imgNews?? >
130 <#attempt>
131
132 <#assign imgJson = jsonFactoryUtil.createJSONObject(imgNews)>
133 <#assign urlimg = "/documents/"+ imgJson.groupId +"/" +imgJson.fileEntryId +"/"+ imgJson.name +"/"+imgJson.uuid >
134 <#recover>
135 <#assign urlimg = "/documents/123/40770/lorem-ipsum.jpg/d705df6c-f78f-adf5-f2dd-616265917670?t=1639427532057" >
136 </#recover>
137
138
139 </#if>
140 <#assign Basica = themeDisplay.getSiteGroup().getExpandoBridge().getAttribute("Basica")>
141 <#assign Basica_Liga = themeDisplay.getSiteGroup().getExpandoBridge().getAttribute("Basica_Liga")>
142
143 <#if article.getStructureId() == Basica_Liga >
144 <#attempt>
145 <#assign link = root.selectSingleNode("dynamic-element[@name='link']/dynamic-content").getText()/>
146 <#assign linkjson = jsonFactoryUtil.createJSONObject(link)>
147 <#assign url = root.selectSingleNode("dynamic-element[@name='url']/dynamic-content").getText()/>
148 <#recover>
149 </#recover>
150 </#if>
151
152
153
154<div id="cta2${instancecta2}" class="bannercta text-white text-break" >
155
156<div class="container ">
157 <div class="row">
158 <div class="col-12 col-md-10 col-xl-10 mx-auto text-center">
159 <article>
160 <#if titulo?has_content>
161 <h1>
162 ${titulo}
163 </h1>
164 </#if>
165 <div class="mb-4 lead" >
166 <#if abstract?has_content>
167 <p>
168 ${abstract}
169 </p>
170 </#if>
171 </div>
172
173
174 <#if txtenlace.getData()?has_content>
175 <#if article.getStructureId() == Basica_Liga >
176
177 <#if link != "">
178 <#attempt>
179 <#assign linkid = link?split("@")>
180 <#assign groupUtil = serviceLocator.findService('com.liferay.portal.kernel.service.GroupLocalService')>
181 <#assign group = groupUtil.getGroup(article.getGroupId())>
182 <#assign groupFriendly = group.getFriendlyURL()>
183 <#assign layoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
184 <#assign layout = layoutService.getLayout(linkjson.getLong("groupId") , linkjson.getBoolean("privateLayout"),linkjson.getLong("layoutId"))>
185 <#assign layoutFriendly = layout.getFriendlyURL()>
186 <#assign link_page = "${url_public}${groupFriendly}${layoutFriendly}">
187 <a id="ctlink" class="mb-4 lead" href="${link_page}">
188 <#recover>
189 </#recover>
190 <#else>
191 <#assign link_page = url>
192 <a id="ctlink" class="mb-4 lead" href="${url}">
193 </#if>
194 <#else>
195 <#assign urldetalle = "/web/general/detalle" />
196 <a id="ctlink" class="mb-4 lead" href="${urldetalle}?group_id=${article.getResourcePrimKey()}">
197 </#if>
198
199 <i class="fal fa-plus-circle pr-2 d-none d-xl-inline d-lg-inline d-md-none"></i>${txtenlace.getData()}<br><i class="fal fa-plus-circle pr-1 d-block d-xl-none d-lg-none d-md-block"></i>
200 </a>
201 </#if>
202
203 </article>
204 </div>
205 </div>
206 </div>
207
208</div>
209
210
211
212<style>
213
214#cta2${instancecta2} {
215height: 1024px;
216 background-image:linear-gradient(to bottom, #030a237a 50%, #030a2382 50%, #030a2378 50%), url("${urlimg}");
217 background-position: center;
218 background-size: cover;
219}
220@media only screen and (max-width: 768px){
221#cta2${instancecta2}{
222 height: 550px;
223 background-image:linear-gradient(to bottom, #030a237a 50%, #030a2382 50%, #030a2378 50%), url("${urlimg}");
224 background-position: center;
225 background-size: cover;
226 }
227
228}
229
230
231</style>
232
233</#if>
parrafo 01