An error occurred while processing the template.
Denied resolving class org.apache.catalina.core.ApplicationHttpRequest by org.apache
1#set ($AssetCategoryLocalService = $serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")) 
2<div class="ay-media-filter taglib-asset-categories-navigation"> 
3  <select id="ay-media-cat-filter" class="ay-select-field"> 
4    <option value="-1">Select Year</option> 
5    #if (!$entries.isEmpty()) 
6      #set ($menuItems= []) 
7      #foreach ($curVocabulary in $entries) 
8 
9        #foreach ($curCat in $curVocabulary.getCategories()) 
10 
11          #set($selectStatus = "") 
12 
13          #if($request.getParameter("categoryId") == $curCat.categoryId) 
14            #set($selectStatus = "selected") 
15          #end 
16 
17 
18          ##create render url for category for link of it, and provide there required parameter 
19          #set($catURL = $renderResponse.createRenderURL()) 
20          #set($categoryId = $curCat.categoryId.toString()) 
21          #set($pqr = $catURL.setParameter("categoryId", $categoryId)) 
22          #set($abc = $catURL.setParameter("resetCur", "true")) 
23          #set ($tmp = $menuItems.add({"title" : "$curCat.name", "url" : "$catURL","isactive" : "$selectStatus"})) 
24 
25 
26        #end 
27 
28        #foreach ($item in $sortTool.sort($menuItems, 'title:desc')) 
29          #if($item.title != 2010) 
30            <option value="$item.url" $item.isactive>$item.title</option> 
31          #end 
32        #end 
33 
34      #end 
35    #end 
36  </select> 
37</div> 
38<script> 
39  $(window).load(function(){ 
40    $("#ay-media-cat-filter").bind("change",function(){ 
41      if($(this).val()!=-1){ 
42        window.location=$(this).val(); 
43
44    }); 
45  }); 
46</script> 
An error occurred while processing the template.
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>