Se ha producido un error al procesar la plantilla.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1#set( $LayoutLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") ) 
2 
3#set( $linkToLayout = $layout) 
4#set( $linkToLayoutSettingsUUID = $portletPreferences.get("portletSetupLinkToLayoutUuid").get(0) ) 
5#if ($linkToLayoutSettingsUUID) 
6  #set( $linkToLayout = $LayoutLocalService.getLayoutByUuidAndGroupId($linkToLayoutSettingsUUID,$groupId,false) ) 
7#end 
8 
9#set( $linkToParentLayout = $LayoutLocalService.getParentLayout($linkToLayout) ) 
10 
11#set( $GroupLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") ) 
12#set( $group = $GroupLocalService.getGroup($groupId) ) 
13 
14## set canonical paths to layouts of interest, may adjust later if local is not default 
15#set( $linkToLayoutPath = $portalUtil.getCanonicalURL($linkToLayout.getFriendlyURL($locale) , $themeDisplay, $linkToLayout) ) 
16#set( $linkToMore = $portalUtil.getCanonicalURL($linkToParentLayout.getFriendlyURL($locale) , $themeDisplay, $linkToParentLayout) ) 
17 
18#set ($defaultLocale = $portalUtil.getSiteDefaultLocale($groupId) ) 
19#if( !$locale.getLanguage().equals($defaultLocale.getLanguage()) ) 
20  #set( $linkToLayoutPath = $portalUtil.getAlternateURL($linkToLayoutPath, $themeDisplay, $locale, $linkToLayout) ) 
21  #set( $linkToMore = $portalUtil.getAlternateURL($linkToMore , $themeDisplay, $locale, $linkToParentLayout) ) 
22#end 
23 
24#set( $linkToBase = $linkToLayoutPath + "/-/article" ) 
25 
26 
27##set javascript array for edit links when applicable 
28<script> 
29  var editlink=new Array(); 
30</script> 
31<div class="ay-block__light"> 
32  <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-media-pr-title")</h3> 
33  <div class="ay-block__light--content"> 
34    #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")) 
35    #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent")) 
36 
37    #if (!$entries.isEmpty()) 
38      ##loopy bit 
39      #foreach ($curEntry in $entries) 
40        #set($renderer = $curEntry.getAssetRenderer() ) 
41        #set($className = $renderer.getClassName() ) 
42 
43        #if( $className == "com.liferay.journal.model.JournalArticle" ) 
44 
45          #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK())) 
46          #set ($articleId = $article.getArticleId()) 
47          #set ($articleGroupId = $article.getGroupId()) 
48          #set ($ddmTemplateKey = "PRESS_RELEASE_LIST_ITEM") 
49          #set ($viewMode = $renderRequest.getPortletMode()) 
50          #set ($languageId = $themeDisplay.getLanguageId()) 
51          #set ($articleGroupId = $article.getGroupId()) 
52 
53          #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay)) 
54 
55 
56          ##get display date and article title 
57          #set( $displayDate = $article.getDisplayDate()) 
58          #set( $datePath = $dateTool.format("/yyyy/MM/dd/", $displayDate, $locale) ) 
59          #set( $urlTitle = $article.getUrlTitle() ) 
60 
61          ##get URL Suffix if article GroupId not same as current GroupId 
62          #set ($urlSuffix = "") 
63          #if( $articleGroupId != $groupId ) 
64            #set ($articleGroup = $GroupLocalService.getGroup($articleGroupId)) 
65            #set ($urlSuffix = "/in" + $articleGroup.getFriendlyURL()) 
66          #end 
67 
68          ##set link to article 
69          #set( $link = $linkToBase + $datePath + $urlTitle + $urlSuffix) 
70 
71 
72 
73          ## create edit URL 
74          #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName()) 
75          #set ($plid = $getterUtil.getLong($themeDisplay.getPlid())) 
76          #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE")) 
77          #set ($windowState = $windowStateFactory.getWindowState("POP_UP")) 
78          #set ($assetRenderer = $curEntry.getAssetRenderer()) 
79          #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL)) 
80          ## <a href="$editURL">Edit Content ($renderRequest) $articleId</a> 
81          ##remplace token from template with link 
82          $entryMarkup.replace('[link]',"$link") 
83 
84          ## create edit URL 
85          #if($assetRenderer.hasEditPermission($permissionChecker)) 
86            <script> 
87              editlink.push('$editURL'); 
88            </script> 
89          #end 
90 
91        #end 
92      #end 
93    #end 
94 
95    ## sets pagination logic 
96 
97    #set($delta = 0) 
98    #set($deltaStr = $portletPreferences.get("pageDelta").get(0)) 
99    #if ( $validator.isNotNull($deltaStr) ) 
100      #set ($delta = $delta.parseInt($deltaStr)) 
101    #end 
102 
103 
104    #set( $page = 1 ) 
105    #set( $pageStr = $renderRequest.getParameter("cur") ) 
106    #if ( $validator.isNotNull($pageStr) ) 
107      #set ($page = $page.parseInt($pageStr)) 
108    #end 
109 
110 
111    #set( $numArt = $total ) 
112    #set( $extraArt = $numArt % $delta ) 
113 
114 
115    #if ($numArt > $delta) 
116      #if ( $extraArt == 0 ) 
117        #set( $numPages = ($numArt / $delta) ) 
118      #else 
119        #set( $numPages = ($numArt / $delta) + 1 ) 
120      #end 
121    #else 
122      #set ($numPages = 1) 
123    #end 
124 
125    #set($pointer = 0) 
126    #if ($page <3) 
127      #set ($pointer = 3) 
128    #elseif ($page > $numPages - 7) 
129      #set ($pointer = $numPages - 7) 
130    #else 
131      #set ($pointer = $page) 
132    #end 
133 
134    #set($start = $pointer - 7) 
135    #if ($start <= 0) 
136      #set ($start = 1) 
137    #end 
138    #set($end = $pointer + 7) 
139    #if ($end > $numPages) 
140      #set ($end = $numPages) 
141    #end 
142 
143    #set($range = [$start..$end]) 
144 
145    #set( $ppid = $themeDisplay.getPortletDisplay().getId()) 
146 
147    ##sets logic of current number articles displayed displayed 
148    #set ( $curEnds =  $delta  ) 
149    #set ( $curCounts =  0  ) 
150    #set ( $curCounts2 =  $curCounts.parseInt($page) ) 
151    #set ( $curEnds2 =  ($curEnds * $curCounts2) ) 
152    #set ( $curStarts = $curEnds2 - $delta + 1) 
153    #set($allpros = 0) 
154 
155 
156    ##pagination creation 
157    ## sets page number variable 
158    #set( $ppid_cur="_"+$ppid+"_cur") 
159    #set( $categoryId = $request.getParameter("categoryId") ) 
160    #set( $resetCur = $request.getParameter("resetCur") ) 
161    #if ( $resetCur && $resetCur == true) 
162      #set( $page = 1 ) 
163    #end 
164    #if ($numPages > 1 && $delta > 5) 
165 
166      <nav class="ay-pagination" style="margin-top:20px;"> 
167        <ul class="ay-pagination--pagination-list"> 
168          #if ($page > 1) 
169            #set ($prevPagef = $page - 1) 
170            <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$prevPagef&p_r_p_564233524_categoryId=$categoryId" class="aoc-button"><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
171          #else 
172            <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
173              <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
174            </svg></li> 
175          #end 
176          #foreach($i in $range) 
177            #if ($i != $page) 
178 
179              <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$i&p_r_p_564233524_categoryId=$categoryId" >$i</a></li> 
180            #else 
181              <li>$page</li> 
182            #end 
183          #end 
184          #if ($page < $numPages) 
185            #set ($nextPagef = $page + 1) 
186            <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$nextPagef&p_r_p_564233524_categoryId=$categoryId" ><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
187          #else 
188            <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
189              <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
190            </svg></li> 
191          #end 
192        </ul> 
193      </nav> 
194    #end 
195    <a href="$linkToMore" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a> 
196  </div> 
197</div> 
198 
199<style> 
200  #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{ 
201    display:none; 
202
203 
204  #ay .ay-block__light--link.ay-more-link{ 
205    display: none; 
206
207 
208  #ay .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{ 
209    display:block; 
210
211 
212</style> 
213 
214##creates edit links for list when logged in 
215<script> 
216 
217  $(window).load(function(){ 
218    if(editlink.length > 0){ 
219      //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length) 
220      $(".ay-media-post__main--content").each(function(index, value){ 
221 
222        $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>'); 
223 
224      }); 
225 
226
227  }); 
228 
229  var closeModal={ 
230    close:function(){ 
231      $('.editModal-container ').remove(); 
232
233
234 
235  var editModal={ 
236    open:function(ifo){ 
237      //alert(ifo); 
238      $("body").append('<div class="editModal-container"><a class="ay-edit-model-close" href="javascript:closeModal.close()"> X </a><div><iframe src="'+ifo+'"></iframe></div></div>'); 
239
240
241</script> 
242 
243<style> 
244  .ay-media-post__main--content{ 
245    display:flex; 
246    align-items:flex-start; 
247    justify-content:flex-start; 
248
249 
250  .ay-media-post__main--content a{ 
251    display:block; 
252
253 
254  a.ay-adt-editlink{ 
255    margin-left: auto; 
256
257  .editModal-container{ 
258    width:100%; 
259    height:100%; 
260    position: fixed; 
261    top:0; 
262    left:0; 
263    z-index: 500; 
264    background: rgba(255,255,255,.85); 
265    display: flex; 
266    flex-direction: column; 
267
268  .editModal-container a{ 
269    align-self: flex-end; 
270    display: block; 
271    margin:10px 10px 0 0; 
272    font-size: 18px; 
273
274  .editModal-container div{ 
275    width:95%; 
276    height: 95%; 
277    margin:auto; 
278    border: 1px solid #ccc; 
279    padding:10px; 
280    background:#fff; 
281
282  .editModal-container iframe { 
283    width:100%; 
284    height: 100%; 
285    border: none; 
286
287 
288</style> 
Se ha producido un error al procesar la plantilla.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1#set( $defaultLocale = $portalUtil.getSiteDefaultLocale($groupId).toString() ) 
2#set( $LayoutLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") ) 
3#set( $portalUrl = $themeDisplay.getPortalURL()) 
4 
5#set( $GroupLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") ) 
6#set( $CompanyLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.CompanyLocalService") ) 
7#set( $group = $GroupLocalService.getGroup($groupId) ) 
8#set( $basePortalUrl = $company.getPortalURL($groupId) ) 
9#set( $siteFriendlyUrl = $group.getFriendlyURL() ) 
10#set( $pathPublicUrl = $portalUtil.getPathFriendlyURLPublic() ) 
11#set( $localePrefix = "/" + $locale.getLanguage() + "_" + $locale.getCountry() ) 
12 
13#set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
14#set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
15 
16#set( $layoutPreferenceArray = $getterUtil.getStringValues($portletPreferences.get("portletSetupLinkToLayoutUuid")) ) 
17#if( $layoutPreferenceArray.size() > 0 ) 
18 
19    #set( $linkToLayoutUuid = $layoutPreferenceArray.get(0) ) 
20    #set( $linkToLayout = $LayoutLocalService.getLayoutByUuidAndCompanyId($linkToLayoutUuid,$themeDisplay.getCompanyId()) ) 
21 
22    #set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
23    #set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
24 
25#end 
26 
27##set javascript array for edit links when applicable 
28<script> 
29    var editlink=new Array(); 
30</script> 
31 
32<div class="ay-block__light"> 
33  <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-media-media-coverage-title")</h3> 
34  <div class="ay-block__light--content"> 
35 
36      #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")) 
37      #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent")) 
38 
39    #if (!$entries.isEmpty()) 
40      ##loopy bit 
41      #foreach ($curEntry in $entries) 
42        #set($renderer = $curEntry.getAssetRenderer() ) 
43        #set($className = $renderer.getClassName() ) 
44 
45          #if( $className == "com.liferay.journal.model.JournalArticle" ) 
46 
47            #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK())) 
48            #set ($articleId = $article.getArticleId()) 
49            #set ($ddmTemplateKey = "MEDIA_COVERAGE_LIST_ITEM") 
50            #set ($viewMode = $renderRequest.getPortletMode()) 
51            #set ($languageId = $themeDisplay.getLanguageId()) 
52            #set ($articleGroupId = $article.getGroupId()) 
53 
54            #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay)) 
55            #set( $linkToBase = "./broker-profile/-/article/") 
56 
57 
58            ##get display date and article title 
59            #set( $displayDate = $article.getDisplayDate()) 
60            #set( $datePath = $dateTool.format("yyyy/MM/dd/", $displayDate, $locale) ) 
61            #set( $urlTitle = $article.getUrlTitle() ) 
62            ##set link to article 
63            #set( $link = $linkToBase + $datePath + $urlTitle) 
64            ##remplace token from template with link 
65            $entryMarkup.replace('[link]',"$link") 
66 
67        #end 
68      #end 
69    #end 
70 
71    ## sets pagination logic 
72 
73        #set($delta = 0) 
74        #set($deltaStr = $portletPreferences.get("pageDelta").get(0)) 
75        #if ( $validator.isNotNull($deltaStr) ) 
76            #set ($delta = $delta.parseInt($deltaStr)) 
77        #end 
78 
79 
80        #set( $page = 1 ) 
81        #set( $pageStr = $renderRequest.getParameter("cur") ) 
82        #if ( $validator.isNotNull($pageStr) ) 
83            #set ($page = $page.parseInt($pageStr)) 
84        #end 
85 
86 
87        #set( $numArt = $total ) 
88        #set( $extraArt = $numArt % $delta ) 
89 
90 
91        #if ($numArt > $delta) 
92            #if ( $extraArt == 0 ) 
93                #set( $numPages = ($numArt / $delta) ) 
94            #else 
95                #set( $numPages = ($numArt / $delta) + 1 ) 
96            #end 
97        #else 
98            #set ($numPages = 1) 
99        #end 
100 
101        #set($pointer = 0) 
102        #if ($page <3) 
103            #set ($pointer = 3) 
104        #elseif ($page > $numPages - 7) 
105            #set ($pointer = $numPages - 7) 
106        #else 
107            #set ($pointer = $page) 
108        #end 
109 
110        #set($start = $pointer - 7) 
111        #if ($start <= 0) 
112            #set ($start = 1) 
113        #end 
114        #set($end = $pointer + 7) 
115        #if ($end > $numPages) 
116            #set ($end = $numPages) 
117        #end 
118 
119        #set($range = [$start..$end]) 
120 
121        #set( $ppid = $themeDisplay.getPortletDisplay().getId()) 
122 
123    ##sets logic of current number articles displayed displayed 
124        #set ( $curEnds =  $delta  ) 
125        #set ( $curCounts =  0  ) 
126        #set ( $curCounts2 =  $curCounts.parseInt($page) ) 
127        #set ( $curEnds2 =  ($curEnds * $curCounts2) ) 
128        #set ( $curStarts = $curEnds2 - $delta + 1) 
129        #set($allpros = 0) 
130 
131 
132    ##pagination creation 
133    ## sets page number variable 
134        #set( $ppid_cur="_"+$ppid+"_cur") 
135        #set( $categoryId = $request.getParameter("categoryId") ) 
136        #set( $resetCur = $request.getParameter("resetCur") ) 
137        #if ( $resetCur && $resetCur == true) 
138          #set( $page = 1 ) 
139        #end 
140        #if ($numPages > 1 && $delta > 5) 
141 
142            <nav class="ay-pagination" style="margin-top:20px;"> 
143                <ul class="ay-pagination--pagination-list"> 
144                    #if ($page > 1) 
145                        #set ($prevPagef = $page - 1) 
146                        <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$prevPagef&p_r_p_564233524_categoryId=$categoryId" class="aoc-button"><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
147                    #else 
148                        <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
149                            <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
150                        </svg></li> 
151                    #end 
152                    #foreach($i in $range) 
153                        #if ($i != $page) 
154 
155                        <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$i&p_r_p_564233524_categoryId=$categoryId" >$i</a></li> 
156                        #else 
157                            <li>$page</li> 
158                        #end 
159                    #end 
160                    #if ($page < $numPages) 
161                        #set ($nextPagef = $page + 1) 
162                        <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$nextPagef&p_r_p_564233524_categoryId=$categoryId" ><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
163                    #else 
164                        <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
165                            <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
166                        </svg></li> 
167                    #end 
168                </ul> 
169            </nav> 
170        #end 
171 
172        <a href="$linkToMore" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a> 
173        <style> #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{ display:none; } #ay .ay-block__light--link.ay-more-link{ display: none; } #ay .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{ display:block; } </style> 
174 
175    </div> 
176</div> 
177 
178 
179#foreach ($curEntry in $entries) 
180## create edit URL 
181    #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName()) 
182    #set ($plid = $getterUtil.getLong($themeDisplay.getPlid())) 
183    #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE")) 
184    #set ($windowState = $windowStateFactory.getWindowState("POP_UP")) 
185    #set ($assetRenderer = $$curEntry.getAssetRenderer()) 
186    #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL)) 
187    #if($assetRenderer.hasEditPermission($permissionChecker)) 
188    <script> 
189        editlink.push('$editURL'); 
190    </script> 
191    #end 
192#end 
193 
194##creates edit links for list when logged in 
195<script> 
196 
197    $(window).load(function(){ 
198        if(editlink.length > 0){ 
199            //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length) 
200            $(".ay-media-post__main--content").each(function(index, value){ 
201 
202                $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>'); 
203 
204            }); 
205 
206
207    }) 
208 
209    var closeModal={ 
210        close:function(){ 
211            $('.editModal-container ').remove(); 
212
213
214 
215    var editModal={ 
216        open:function(ifo){ 
217            //alert(ifo); 
218            $("body").append('<div class="editModal-container"><a class="ay-edit-model-close" href="javascript:closeModal.close()"> X </a><div><iframe src="'+ifo+'"></iframe></div></div>'); 
219
220
221</script> 
222 
223<style> 
224    .ay-media-post__main--content{ 
225        display:flex; 
226        align-items:flex-start; 
227        justify-content:flex-start; 
228
229 
230    .ay-media-post__main--content a{ 
231        display:block; 
232
233 
234    a.ay-adt-editlink{ 
235        margin-left: auto; 
236
237    .editModal-container{ 
238        width:100%; 
239        height:100%; 
240        position: fixed; 
241        top:0; 
242        left:0; 
243        z-index: 500; 
244        background: rgba(255,255,255,.85); 
245        display: flex; 
246        flex-direction: column; 
247
248    .editModal-container a{ 
249        align-self: flex-end; 
250        display: block; 
251        margin:10px 10px 0 0; 
252        font-size: 18px; 
253
254    .editModal-container div{ 
255        width:95%; 
256        height: 95%; 
257        margin:auto; 
258        border: 1px solid #ccc; 
259        padding:10px; 
260        background:#fff; 
261
262    .editModal-container iframe { 
263        width:100%; 
264        height: 100%; 
265        border: none; 
266
267</style> 
Comentarios de los expertos
Se ha producido un error al procesar la plantilla.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1#set( $defaultLocale = $portalUtil.getSiteDefaultLocale($groupId).toString() ) 
2#set( $LayoutLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") ) 
3#set( $portalUrl = $themeDisplay.getPortalURL()) 
4 
5#set( $GroupLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") ) 
6#set( $CompanyLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.CompanyLocalService") ) 
7#set( $group = $GroupLocalService.getGroup($groupId) ) 
8#set( $basePortalUrl = $company.getPortalURL($groupId) ) 
9#set( $siteFriendlyUrl = $group.getFriendlyURL() ) 
10#set( $pathPublicUrl = $portalUtil.getPathFriendlyURLPublic() ) 
11#set( $localePrefix = "/" + $locale.getLanguage() + "_" + $locale.getCountry() ) 
12 
13#set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
14#set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
15 
16#set( $layoutPreferenceArray = $getterUtil.getStringValues($portletPreferences.get("portletSetupLinkToLayoutUuid")) ) 
17#if( $layoutPreferenceArray.size() > 0 ) 
18 
19    #set( $linkToLayoutUuid = $layoutPreferenceArray.get(0) ) 
20    #set( $linkToLayout = $LayoutLocalService.getLayoutByUuidAndCompanyId($linkToLayoutUuid,$themeDisplay.getCompanyId()) ) 
21 
22    #set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
23    #set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
24 
25#end 
26 
27##set javascript array for edit links when applicable 
28<script> 
29    var editlink=new Array(); 
30</script> 
31 
32<div class="ay-block__light"> 
33    <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-media-ceo-int-title")</h3> 
34    <div class="ay-block__light--content"> 
35        #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")) 
36        #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent")) 
37 
38        #if (!$entries.isEmpty()) 
39            ##loopy bit 
40            #foreach ($curEntry in $entries) 
41                #set($renderer = $curEntry.getAssetRenderer() ) 
42                #set($className = $renderer.getClassName() ) 
43 
44                #if( $className == "com.liferay.portlet.journal.model.JournalArticle" ) 
45 
46                    #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK())) 
47                    #set ($articleId = $article.getArticleId()) 
48                    #set ($ddmTemplateKey = "CEO_INTERVIEW_ITEM") 
49                    #set ($viewMode = $renderRequest.getPortletMode()) 
50                    #set ($languageId = $themeDisplay.getLanguageId()) 
51                    #set ($articleGroupId = $article.getGroupId()) 
52 
53                    #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay)) 
54 
55                    ##get display date and article title 
56                    #set( $displayDate = $article.getDisplayDate()) 
57                    #set( $datePath = $dateTool.format("yyyy/MM/dd/", $displayDate, $locale) ) 
58                    #set( $urlTitle = $article.getUrlTitle() ) 
59                    ##set link to article 
60                    #set( $link = $linkToBase + $datePath + $urlTitle) 
61                    ##remplace token from template with link 
62                    ##$entryMarkup.replace('[link]',"$link") 
63 
64                    $entryMarkup 
65 
66                #end 
67            #end 
68 
69        #end 
70        <a href="$linkToMore" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a> 
71        <style> #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{ display:none; } #ay .ay-block__light--link.ay-more-link{ display: none; } #ay .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{ display:block; } </style> 
72    </div> 
73</div> 
74 
75## sets pagination logic 
76 
77#set($delta = 0) 
78#set($deltaStr = $portletPreferences.get("pageDelta").get(0)) 
79#if ( $validator.isNotNull($deltaStr) ) 
80    #set ($delta = $delta.parseInt($deltaStr)) 
81#end 
82 
83 
84#set( $page = 1 ) 
85#set( $pageStr = $renderRequest.getParameter("cur") ) 
86#if ( $validator.isNotNull($pageStr) ) 
87    #set ($page = $page.parseInt($pageStr)) 
88#end 
89 
90 
91#set( $numArt = $total ) 
92#set( $extraArt = $numArt % $delta ) 
93 
94 
95#if ($numArt > $delta) 
96    #if ( $extraArt == 0 ) 
97        #set( $numPages = ($numArt / $delta) ) 
98    #else 
99        #set( $numPages = ($numArt / $delta) + 1 ) 
100    #end 
101#else 
102    #set ($numPages = 1) 
103#end 
104 
105#set($pointer = 0) 
106#if ($page <3) 
107    #set ($pointer = 3) 
108#elseif ($page > $numPages - 7) 
109    #set ($pointer = $numPages - 7) 
110#else 
111    #set ($pointer = $page) 
112#end 
113 
114#set($start = $pointer - 7) 
115#if ($start <= 0) 
116    #set ($start = 1) 
117#end 
118#set($end = $pointer + 7) 
119#if ($end > $numPages) 
120    #set ($end = $numPages) 
121#end 
122 
123#set($range = [$start..$end]) 
124 
125#set( $ppid = $themeDisplay.getPortletDisplay().getId()) 
126 
127##sets logic of current number articles displayed displayed 
128#set ( $curEnds =  $delta  ) 
129#set ( $curCounts =  0  ) 
130#set ( $curCounts2 =  $curCounts.parseInt($page) ) 
131#set ( $curEnds2 =  ($curEnds * $curCounts2) ) 
132#set ( $curStarts = $curEnds2 - $delta + 1) 
133#set($allpros = 0) 
134 
135 
136##pagination creation 
137## sets page number variable 
138#set( $ppid_cur="_"+$ppid+"_cur") 
139 
140#if ($numPages > 1 && $delta > 5 ) 
141<nav class="ay-pagination"> 
142    <ul class="ay-pagination--pagination-list"> 
143        #if ($page > 1) 
144            #set ($prevPagef = $page - 1) 
145            <li><a href="?p_p_id=$ppid&$ppid_cur=$prevPagef" class="aoc-button"><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
146        #else 
147            <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
148                <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
149            </svg></li> 
150        #end 
151        #foreach($i in $range) 
152            #if ($i != $page) 
153 
154                <li><a href="?p_p_id=$ppid&$ppid_cur=$i" >$i</a></li> 
155            #else 
156                <li>$page</li> 
157            #end 
158        #end 
159        #if ($page < $numPages) 
160            #set ($nextPagef = $page + 1) 
161            <li><a href="?p_p_id=$ppid&$ppid_cur=$nextPagef" ><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
162        #else 
163            <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
164                <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
165            </svg></li> 
166        #end 
167    </ul> 
168</nav> 
169#end 
170 
171 
172#foreach ($curEntry in $entries) 
173    ## create edit URL 
174    #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName()) 
175    #set ($plid = $getterUtil.getLong($themeDisplay.getPlid())) 
176    #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE")) 
177    #set ($windowState = $windowStateFactory.getWindowState("POP_UP")) 
178    #set ($assetRenderer = $curEntry.getAssetRenderer()) 
179    #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL)) 
180    #if($assetRenderer.hasEditPermission($permissionChecker)) 
181    <script> 
182        editlink.push('$editURL'); 
183    </script> 
184    #end 
185#end 
186##creates edit links for list when logged in 
187<script> 
188 
189    $(window).load(function(){ 
190        if(editlink.length > 0){ 
191            //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length) 
192            $(".ay-media-post__main--content").each(function(index, value){ 
193 
194                $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>'); 
195 
196            }); 
197 
198
199    }) 
200 
201    var closeModal={ 
202        close:function(){ 
203            $('.editModal-container ').remove(); 
204
205
206 
207    var editModal={ 
208        open:function(ifo){ 
209            //alert(ifo); 
210            $("body").append('<div class="editModal-container"><a class="ay-edit-model-close" href="javascript:closeModal.close()"> X </a><div><iframe src="'+ifo+'"></iframe></div></div>'); 
211
212
213</script> 
214 
215<style> 
216    .ay-media-post__main--content{ 
217        display:flex; 
218        align-items:flex-start; 
219        justify-content:flex-start; 
220
221 
222    .ay-media-post__main--content a{ 
223        display:block; 
224
225 
226    a.ay-adt-editlink{ 
227        margin-left: auto; 
228
229    .editModal-container{ 
230        width:100%; 
231        height:100%; 
232        position: fixed; 
233        top:0; 
234        left:0; 
235        z-index: 500; 
236        background: rgba(255,255,255,.85); 
237        display: flex; 
238        flex-direction: column; 
239
240    .editModal-container a{ 
241        align-self: flex-end; 
242        display: block; 
243        margin:10px 10px 0 0; 
244        font-size: 18px; 
245
246    .editModal-container div{ 
247        width:95%; 
248        height: 95%; 
249        margin:auto; 
250        border: 1px solid #ccc; 
251        padding:10px; 
252        background:#fff; 
253
254    .editModal-container iframe { 
255        width:100%; 
256        height: 100%; 
257        border: none; 
258
259</style> 
Se ha producido un error al procesar la plantilla.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1#set( $defaultLocale = $portalUtil.getSiteDefaultLocale($groupId).toString() ) 
2#set( $LayoutLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") ) 
3#set( $portalUrl = $themeDisplay.getPortalURL()) 
4 
5#set( $GroupLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") ) 
6#set( $CompanyLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.CompanyLocalService") ) 
7#set( $group = $GroupLocalService.getGroup($groupId) ) 
8#set( $basePortalUrl = $company.getPortalURL($groupId) ) 
9#set( $siteFriendlyUrl = $group.getFriendlyURL() ) 
10#set( $pathPublicUrl = $portalUtil.getPathFriendlyURLPublic() ) 
11#set( $localePrefix = "/" + $locale.getLanguage() + "_" + $locale.getCountry() ) 
12 
13#set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
14#set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
15 
16#set( $layoutPreferenceArray = $getterUtil.getStringValues($portletPreferences.get("portletSetupLinkToLayoutUuid")) ) 
17#if( $layoutPreferenceArray.size() > 0 ) 
18 
19  #set( $linkToLayoutUuid = $layoutPreferenceArray.get(0) ) 
20  #set( $linkToLayout = $LayoutLocalService.getLayoutByUuidAndCompanyId($linkToLayoutUuid,$themeDisplay.getCompanyId()) ) 
21 
22  #set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
23  #set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
24 
25#end 
26 
27 
28##set javascript array for edit links when applicable 
29<script> 
30  var editlink=new Array(); 
31</script> 
32 
33<div class="ay-block__light"> 
34  <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-media-ceo-video-audio-title")</h3> 
35  <div class="ay-block__light--content"> 
36    #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")) 
37    #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent")) 
38 
39    #if (!$entries.isEmpty()) 
40      ##loopy bit 
41      #foreach ($curEntry in $entries) 
42        #set($renderer = $curEntry.getAssetRenderer() ) 
43        #set($className = $renderer.getClassName() ) 
44 
45        #if( $className == "com.liferay.journal.model.JournalArticle" ) 
46 
47          #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK())) 
48          #set ($articleId = $article.getArticleId()) 
49          #set ($ddmTemplateKey = "CEO_AUDIO_VIDEO") 
50          #set ($viewMode = $renderRequest.getPortletMode()) 
51          #set ($languageId = $themeDisplay.getLanguageId()) 
52          #set ($articleGroupId = $article.getGroupId()) 
53 
54          #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay)) 
55          #set( $linkToBase = "./press-release-detail/-/article/") 
56 
57 
58          ##get display date and article title 
59          #set( $displayDate = $article.getDisplayDate()) 
60          #set( $datePath = $dateTool.format("yyyy/MM/dd/", $displayDate, $locale) ) 
61          #set( $urlTitle = $article.getUrlTitle() ) 
62          ##set link to article 
63          #set( $link = $linkToBase + $datePath + $urlTitle) 
64 
65 
66 
67          ## create edit URL 
68          #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName()) 
69          #set ($plid = $getterUtil.getLong($themeDisplay.getPlid())) 
70          #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE")) 
71          #set ($windowState = $windowStateFactory.getWindowState("POP_UP")) 
72          #set ($assetRenderer = $entry.getAssetRenderer()) 
73          #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL)) 
74          ## <a href="$editURL">Edit Content ($renderRequest) $articleId</a> 
75          ##remplace token from template with link 
76          $entryMarkup.replace('[link]',"$link") 
77 
78 
79        #end 
80      #end 
81    #end 
82    <a href="$linkToMore" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a> 
83    <style> #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{ display:none; } #ay .ay-block__light--link.ay-more-link{ display: none; } #ay .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{ display:block; } </style> 
84  </div> 
85 
86  #foreach ($curEntry in $entries) 
87    ## create edit URL 
88    #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName()) 
89    #set ($plid = $getterUtil.getLong($themeDisplay.getPlid())) 
90    #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE")) 
91    #set ($windowState = $windowStateFactory.getWindowState("POP_UP")) 
92    #set ($assetRenderer = $curEntry.getAssetRenderer()) 
93    #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL)) 
94    #if($assetRenderer.hasEditPermission($permissionChecker)) 
95      <script> 
96        editlink.push('$editURL'); 
97      </script> 
98    #end 
99  #end 
100</div> 
101##creates edit links for list when logged in 
102<script> 
103 
104  $(window).load(function(){ 
105    if(editlink.length > 0){ 
106      //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length) 
107      $(".ay-media-post__main--content").each(function(index, value){ 
108 
109        $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>'); 
110 
111      }); 
112 
113
114  }) 
115 
116  var closeModal={ 
117    close:function(){ 
118      $('.editModal-container ').remove(); 
119
120
121 
122  var editModal={ 
123    open:function(ifo){ 
124      //alert(ifo); 
125      $("body").append('<div class="editModal-container"><a class="ay-edit-model-close" href="javascript:closeModal.close()"> X </a><div><iframe src="'+ifo+'"></iframe></div></div>'); 
126
127
128</script> 
129 
130<style> 
131  .ay-media-post__main--content{ 
132    display:flex; 
133    align-items:flex-start; 
134    justify-content:flex-start; 
135
136 
137  .ay-media-post__main--content a{ 
138    display:block; 
139
140 
141  a.ay-adt-editlink{ 
142    margin-left: auto; 
143
144  .editModal-container{ 
145    width:100%; 
146    height:100%; 
147    position: fixed; 
148    top:0; 
149    left:0; 
150    z-index: 500; 
151    background: rgba(255,255,255,.85); 
152    display: flex; 
153    flex-direction: column; 
154
155  .editModal-container a{ 
156    align-self: flex-end; 
157    display: block; 
158    margin:10px 10px 0 0; 
159    font-size: 18px; 
160
161  .editModal-container div{ 
162    width:95%; 
163    height: 95%; 
164    margin:auto; 
165    border: 1px solid #ccc; 
166    padding:10px; 
167    background:#fff; 
168
169  .editModal-container iframe { 
170    width:100%; 
171    height: 100%; 
172    border: none; 
173
174</style>