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