img
img img

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#373500" at line 115, column 33]

----
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 currentTag = request.getParam...  [in template "37401#37443#373500" at line 115, column 11]
----
1<style> 
2  .searchPanel button.keywords.active { 
3      background-color: #E09948; 
4      color: white; 
5      border-color: #E09948; 
6
7  .input-search-bar { 
8      position: relative; 
9			margin-top: -20px; 
10    margin-bottom: 40px; 
11
12 
13  .input-search-bar #searchbarinput { 
14      width: 100%; 
15    background: #FDF8EE; 
16    border: 1px solid #FDF8EE; 
17    outline: none; 
18    border-radius: 25px; 
19    height: 50px; 
20    padding: 10px 150px 10px 25px; 
21		box-shadow: 0px 12px 40px #00000019; 
22
23	 
24	.rtl .input-search-bar #searchbarinput { 
25	padding: 10px 25px 10px 150px; 
26
27 
28  .input-search-bar .searchBtn { 
29      position: absolute; 
30    top: 10px; 
31    right: 15px; 
32    height: 30px; 
33    padding: 5px 30px; 
34    background: #E09948; 
35    border: 1px solid #E09948; 
36    border-radius: 25px; 
37    box-shadow: 0px 5px 8px #E0994880; 
38    color: #FDF8EE; 
39    font-size: 10px; 
40
41	 
42	.rtl .input-search-bar .searchBtn { 
43	right: auto; 
44	left: 15px; 
45
46	 
47	.input-search-bar .clear-btn { 
48	width: 16px; 
49    position: absolute; 
50    top: 10px; 
51    right: 111px; 
52    height: 30px; 
53
54	 
55	.rtl .input-search-bar .clear-btn { 
56	right: auto; 
57	left: 111px; 
58
59	 
60	.input-search-bar .searchBtn.disabled { 
61    cursor: not-allowed; 
62    background-color: dimgrey; 
63    opacity: 0.5; 
64		border: none; 
65    box-shadow: none; 
66
67	.rtl p.custom-search-left button:first-of-type { 
68    margin-right: 5px; 
69
70@media(min-width:769px){ 
71.searchPanel button.keywords { 
72	font-size: 12px;   
73
74
75</style> 
76 
77<#assign currentLocale = themeDisplay.getLocale() /> 
78<#assign articleId = .vars['reserved-article-id'].data /> 
79<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
80<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
81<#assign assetTagLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") /> 
82<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(scopeGroupId), articleId) /> 
83<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.resourcePrimKey) /> 
84 
85<#assign tagsEn = { 
86    "news": "News", 
87    "flyers": "Flyers", 
88    "magazine": "Magazine", 
89    "annual reports": "Annual reports" 
90} /> 
91 
92<#assign tagsAr = { 
93    "news": "الأخبار", 
94    "flyers": "منشورات", 
95    "magazine": "مجلة", 
96    "annual reports": "التقارير السنوية" 
97} /> 
98<div class="container"> 
99<div class="row searchpagecontainer"> 
100  <div class="col-md-7 col-sm-12"> 
101    <p class="font-10 font-md-12 text-default custom-search-left"> 
102      <#if (SearchInText.getData())??> 
103          ${SearchInText.getData()} 
104      </#if> 
105 
106      <#list asset.getTags() as tag> 
107          <#assign formattedTagName = tag.getName()?replace("-", " ")?lower_case> 
108 
109          <#if currentLocale?starts_with("ar")> 
110            <#assign translatedTagName = tagsAr[formattedTagName]!"${formattedTagName}"> 
111          <#else> 
112            <#assign translatedTagName = tagsEn[formattedTagName]!"${formattedTagName}"> 
113          </#if> 
114 
115          <#assign currentTag = request.getParameter("tag")?trim> 
116          <#assign activeClass = ''> 
117          <#if currentTag == tag.getName()> 
118              <#assign activeClass = 'active'> 
119          </#if> 
120 
121          <button type="button" id="${tag.getName()}" data-tag="${tag.getName()}" class="keywords tagstab ${activeClass}"> 
122            ${languageUtil.get(locale, "in")} ${translatedTagName} 
123          </button> 
124      </#list> 
125    </p> 
126  </div> 
127 
128  <div class="col-md-5 col-sm-12"> 
129    <div class="input-search-bar"> 
130      <!-- Correctly fetch the 'q' query parameter for search input --> 
131      <#assign searchQuery = request.getParameter("q")?trim> 
132      <input id="searchbarinput" type="text" value="${searchQuery?html}"> 
133       
134      <#assign clearButtonClass = 'd-none'> 
135      <#if searchQuery?? && searchQuery?length gt 0> 
136          <#assign clearButtonClass = ''> 
137      </#if> 
138      <img class="clear-btn mx-2 cursor ${clearButtonClass}" id="searchclear-btn" src="/documents/d/kfund/clear"/> 
139 
140      <button class="searchBtn"><@liferay.language key="Search-text" /></button> 
141    </div> 
142  </div> 
143</div> 
144</div> 
145 
146 
147<script> 
148$(document).ready(function() { 
149 
150    function getQueryParam(param) { 
151        var urlParams = new URLSearchParams(window.location.search); 
152        return urlParams.get(param); 
153
154 
155    $('.tagstab').click(function() { 
156        var tag = $(this).attr('id'); 
157        var keyword = getQueryParam('q'); 
158 
159        var newUrl = window.location.pathname + '?tag=' + encodeURIComponent(tag); 
160        if (keyword) { 
161            newUrl += '&q=' + encodeURIComponent(keyword); 
162
163 
164        window.location.href = newUrl; 
165    }); 
166 
167    const searchInput = document.getElementById('searchbarinput'); 
168    const searchBtn = document.querySelector('.searchBtn'); 
169    const clearBtn = document.getElementById('searchclear-btn'); 
170    const params = new URLSearchParams(window.location.search); 
171    const tag = params.get('tag'); 
172 
173    function toggleSearchButton() { 
174        searchBtn.disabled = searchInput.value.trim() === ''; 
175        searchBtn.classList.toggle('disabled', searchInput.value.trim() === ''); 
176
177 
178    searchInput.addEventListener('input', function() { 
179        clearBtn.classList.toggle('d-none', searchInput.value === ''); 
180        toggleSearchButton(); 
181    }); 
182 
183    clearBtn.addEventListener('click', function() { 
184        searchInput.value = ''; 
185        clearBtn.classList.add('d-none'); 
186        toggleSearchButton(); 
187    }); 
188 
189    searchBtn.addEventListener('click', function() { 
190        if (searchInput.value.trim() === '') return; 
191 
192        var qValue = searchInput.value; 
193        var newUrl = window.location.pathname + '?tag=' + tag + '&q=' + qValue; 
194        window.location.href = newUrl; 
195    }); 
196 
197    searchInput.addEventListener('keydown', function(e) { 
198        if (e.key === 'Enter' && searchInput.value.trim() !== '') { 
199            var qValue = searchInput.value; 
200            var newUrl = window.location.pathname + '?tag=' + tag + '&q=' + qValue; 
201            window.location.href = newUrl; 
202
203    }); 
204 
205    toggleSearchButton(); 
206}); 
207</script> 
Tag
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> 
CONNECT WITH US img