An error occurred while processing the template.
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>