SEARCH RESULTS
Showing results for
An error occurred while processing the template.
The following has evaluated to null or missing: ==> request.getParameter("tag") [in template "37401#37443#81736" at line 85, column 16] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign tag = request.getParameter("t... [in template "37401#37443#81736" at line 85, column 1] ----
1<style>
2 .news-item .news-img {
3 height: 220px;
4 object-fit: cover;
5 background: radial-gradient(circle, rgba(249, 240, 220, 1) 0%, rgba(246, 233, 206, 1) 35%, rgba(242, 225, 188, 1) 100%);
6 }
7 .mag-item.mag-list img {
8 min-height: 300px;
9 }
10 .mt-40 img.w-100 {
11 display: block;
12 }
13 .pagination-bar {
14 justify-content: center;
15 }
16 .pagination-bar .pagination-items-per-page>button {
17 position: absolute;
18 left: 50px;
19 top: -15px;
20 }
21
22 .pagination-bar .pagination li.page-item:last-child {
23 margin-left: 155px;
24 }
25
26 .pagination-bar .pagination-results {
27 display: none;
28 }
29
30 .pagination-bar li.page-item .page-link {
31 background: #E09948;
32 color: white;
33 width: 33px;
34 display: flex;
35 justify-content: center;
36 border-radius: 25px;
37 padding: 5px;
38 }
39
40 .pagination-bar li.page-item {
41 display: none;
42 }
43
44 .pagination-bar li.page-item:first-child, li.page-item:last-child {
45 display: block;
46 }
47
48 .pagination-bar li.page-item .page-link:hover:before {
49 background-color: unset;
50 }
51
52 .dropdown-toggle::after {
53 margin-left: unset !important;
54 }
55
56 .pagination-items-per-page>button {
57 background-color: #E09948;
58 border-color: #E09948;
59 color: #FDF8EE;
60 border-radius: 25px;
61 font-weight: 400 !important;
62 padding: 5px 20px !important;
63 letter-spacing: 0;
64 }
65
66 .pagination-items-per-page>button:hover {
67 background-color: #E09948;
68 border-color: #E09948;
69 color: #FDF8EE;
70 }
71
72 .pagination-items-per-page>button:hover::before {
73 background-color: unset !important;
74 height: unset !important;
75 }
76
77 .pagination-items-per-page, .pagination {
78 margin-bottom: 0px !important;
79 }
80</style>
81
82<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() />
83<#assign folderLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFolderLocalService") />
84<#assign themeDisplay = serviceContext.getThemeDisplay() />
85<#assign tag = request.getParameter("tag") />
86<div class="container">
87<div class="row mt-40">
88 <#if entries?has_content>
89 <#-- Initialize lists for News and Magazines entries -->
90 <#assign newsEntries = []>
91 <#assign magazineEntries = []>
92 <#assign flayersEntries = []>
93 <#assign annualEntries = []>
94
95 <#-- Loop through entries to categorize them -->
96 <#list entries as entry>
97 <#assign assetEntryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
98 <#assign assetTagLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") />
99 <#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
100 <#assign assetEntry = assetEntryLocalServiceUtil.fetchEntry(entry.getClassName(), entry.getClassPK()) />
101 <#assign tagIds = assetEntry.getTags() />
102
103 <#list tagIds as tagID>
104 <#if tagID.getName() == "news">
105 <#-- Add entry to newsEntries list -->
106 <#assign newsEntries += [entry]>
107 <#elseif tagID.getName() == "magazine">
108 <#-- Add entry to magazineEntries list -->
109 <#assign magazineEntries += [entry]>
110 <#elseif tagID.getName() == "flyers">
111 <#-- Add entry to flayersEntries list -->
112 <#assign flayersEntries += [entry]>
113 <#elseif tagID.getName() == "annual reports">
114 <#-- Add entry to annualEntries list -->
115 <#assign annualEntries += [entry]>
116 </#if>
117 </#list>
118 </#list>
119
120 <#-- Display News section if there are any news entries -->
121 <#if newsEntries?has_content>
122 <#list newsEntries as entry>
123 <#assign createDate = journalArticleService.getLatestArticle(entry.getClassPK()).getCreateDate()?datetime>
124 <#assign entryID = journalArticleService.getLatestArticle(entry.getClassPK()).articleId>
125 <#assign entryImage = journalArticleService.getLatestArticle(entry.getClassPK()).smallImageURL>
126 <#if entry.isThumbnailVisible()>
127 <#assign imageUrl = entry.getThumbnailURLString()>
128 <#elseif entryImage == "">
129 <#assign imageUrl = '/documents/66721/388969/Placeholder.svg/40c13021-7f28-495d-ef35-3f7214332d66?t=1728051774827'>
130 <#else>
131 <#assign imageUrl = entryImage>
132 </#if>
133 <div class="col-6 col-lg-4 mb-4 news-item cursor" onclick="window.location='/web/kfund/news-detail?nid=${entryID}';">
134 <img src="${imageUrl}" alt="${htmlUtil.escape(entry.getTitle())}" class="w-100 rounded-15 news-img" />
135 <div class="row">
136 <#if entry.isCreationDateVisible()>
137 <div class="col-8">
138 <p class="mb-0 font-md-14 font-6 text-default broken-top-30 ml-md-30 ml-10 btn btn-light rounded-10 d-none">${createDate?string("MM/dd/yyyy")}</p>
139 </div>
140 </#if>
141 <div class="col-4 text-right">
142 <img src="/documents/d/kfund/circle-arrow-up-orange" alt="img" class="broken-top-30 mr-md-30 mr-10 w-md-30p w-20p" />
143 </div>
144 <div class="col-12 col-md-12">
145 <p class="font-weight-600 px-md-30 px-10 font-8 font-md-16">${htmlUtil.escape(entry.getTitle())}</p>
146 </div>
147 </div>
148 </div>
149 </#list>
150 </#if>
151 <#-- Display Magazines section if there are any magazine entries -->
152 <#if magazineEntries?has_content>
153 <#list magazineEntries as entry>
154 <#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
155 <#assign entryArticle = journalArticleService.getLatestArticle(entry.getClassPK()) />
156 <#assign docXML = saxReaderUtil.read(entryArticle.getDocument().asXML()) />
157 <#if docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='${themeDisplay.getLocale()}']")?has_content >
158 <#assign docContent = docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='${themeDisplay.getLocale()}']") />
159 <#else>
160 <#assign docContent = docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='en_US']") />
161 </#if>
162
163 <#if docContent?has_content>
164 <#assign docData = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"].createJSONObject(docContent.getData()) />
165 <#assign fileEntryId = docData.getString("fileEntryId") />
166 <#assign groupId = docData.getString("groupId") />
167 <#assign uuid = docData.getString("uuid") />
168 <#assign title = docData.getString("title")?replace(" ", "-") />
169 <#assign pdfUrl = themeDisplay.getPortalURL() + "/documents/" + groupId + "/0/" + title + "/" + uuid />
170 </#if>
171 <div class="col-6 col-md-4 col-lg-3" onclick="window.location='${pdfUrl}';">
172 <img src="${pdfUrl}?documentThumbnail=1" alt="${htmlUtil.escape(entry.getTitle())}" class="w-100 rounded-15 news-img" />
173 <div class="row">
174 <div class="col-12 col-md-12">
175 <p class="font-weight-600 px-md-30 px-10 font-8 font-md-16">${htmlUtil.escape(entry.getTitle())}</p>
176 </div>
177 </div>
178 </div>
179 </#list>
180 </#if>
181
182 <#if flayersEntries?has_content>
183 <#list flayersEntries as entry>
184 <#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
185 <#assign entryArticle = journalArticleService.getLatestArticle(entry.getClassPK()) />
186 <#assign docXML = saxReaderUtil.read(entryArticle.getDocument().asXML()) />
187 <#if docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='${themeDisplay.getLocale()}']")?has_content >
188 <#assign docContent = docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='${themeDisplay.getLocale()}']") />
189 <#else>
190 <#assign docContent = docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='en_US']") />
191 </#if>
192
193 <#if docContent?has_content>
194 <#assign docData = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"].createJSONObject(docContent.getData()) />
195 <#assign fileEntryId = docData.getString("fileEntryId") />
196 <#assign groupId = docData.getString("groupId") />
197 <#assign uuid = docData.getString("uuid") />
198 <#assign title = docData.getString("title")?replace(" ", "-") />
199 <#assign pdfUrl = themeDisplay.getPortalURL() + "/documents/" + groupId + "/0/" + title + "/" + uuid />
200 </#if>
201
202 <div class="col-6 col-md-4 col-lg-3 mb-4 mag-item mag-list cursor" onclick="window.location='${pdfUrl}';">
203 <img class="w-100 rounded-15" src="${pdfUrl}?documentThumbnail=1" alt="${htmlUtil.escape(entry.getTitle())}">
204
205 <div class="row">
206 <div class="col-12 col-md-12">
207 <p class="font-weight-600 px-md-30 px-10 font-8 font-md-16">${htmlUtil.escape(entry.getTitle())}</p>
208 </div>
209 </div>
210 </div>
211 </#list>
212 </#if>
213
214 <#-- Display Annual reports section if there are any annual report entries -->
215 <#if annualEntries?has_content>
216 <#list annualEntries as entry>
217 <#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
218 <#assign entryArticle = journalArticleService.getLatestArticle(entry.getClassPK()) />
219 <#assign docXML = saxReaderUtil.read(entryArticle.getDocument().asXML()) />
220 <#if docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='${themeDisplay.getLocale()}']")?has_content >
221 <#assign docContent = docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='${themeDisplay.getLocale()}']") />
222 <#else>
223 <#assign docContent = docXML.selectSingleNode("/root/dynamic-element[@field-reference='UploadPDF']/dynamic-content[@language-id='en_US']") />
224 </#if>
225
226 <#if docContent?has_content>
227 <#assign docData = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"].createJSONObject(docContent.getData()) />
228 <#assign fileEntryId = docData.getString("fileEntryId") />
229 <#assign groupId = docData.getString("groupId") />
230 <#assign uuid = docData.getString("uuid") />
231 <#assign title = docData.getString("title")?replace(" ", "-") />
232 <#assign pdfUrl = themeDisplay.getPortalURL() + "/documents/" + groupId + "/0/" + title + "/" + uuid />
233 </#if>
234
235 <div class="col-6 col-md-4 col-lg-3 mag-item" onclick="window.location='${pdfUrl}';">
236 <img src="${pdfUrl}?documentThumbnail=1" alt="${htmlUtil.escape(entry.getTitle())}" class="w-100 rounded-15 news-img" />
237 <div class="row">
238 <div class="col-12 col-md-12">
239 <p class="font-weight-600 px-md-30 px-10 font-8 font-md-16">${htmlUtil.escape(entry.getTitle())}</p>
240 </div>
241 </div>
242 </div>
243 </#list>
244 </#if>
245
246 </#if>
247</div>
248</div>
249<script>
250 $(document).ready(function() {
251 // Iterate through all text nodes and remove the unwanted text
252 $('.mag-item').contents().filter(function() {
253 return this.nodeType === Node.TEXT_NODE && this.nodeValue.includes('?documentThumbnail=1');
254 }).each(function() {
255 this.nodeValue = this.nodeValue.replace('?documentThumbnail=1', '');
256 });
257
258});
259 // Iterate through all text nodes and remove the unwanted text
260 $('.mag-item').contents().filter(function() {
261 return this.nodeType === Node.TEXT_NODE && this.nodeValue.includes('?documentThumbnail=1');
262 }).each(function() {
263 this.nodeValue = this.nodeValue.replace('?documentThumbnail=1', '');
264 });
265</script>