MOE Popular Search Keywords

Accessibility Options

  • A+
  • A
  • A-

Preferred Colours

Night Vision

Translate this page to

The Ministry is not responsible for the translation output by Google.

Asset Publisher

Asset Publisher

Breadcrumb

Check out

Our Publications 

Sort

Search Results

An error occurred while processing the template.
When calling function "getFileEntryURL", required parameter "fileEntry" (parameter #1) was specified, but had null/missing value.

----
Tip: If the parameter value expression on the caller side is known to be legally null/missing, you may want to specify a default value for it with the "!" operator, like paramValue!defaultValue.
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #function getFileEntryURL(fileEntry)  [in template "20097#20123#422082" in function "getFileEntryURL" at line 43, column 1]
	- Reached through: ${getFileEntryURL(file)}  [in template "20097#20123#422082" at line 103, column 19]
----
1<style> 
2    .page-editor__fragment-content .portlet > .portlet-topper{ 
3        opacity: 1; 
4        pointer-events: inherit; 
5
6    .portlet-sort { 
7        display: none; 
8
9</style> 
10 
11<#assign lrDateUtil = staticUtil["com.liferay.portal.kernel.util.DateUtil"] /> 
12<#assign lrStringUtil = staticUtil["com.liferay.portal.kernel.util.StringUtil"] /> 
13 
14<#assign dlAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") /> 
15<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
16<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
17<#assign monthArr = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] /> 
18<#assign MoeCommonUtil = serviceLocator.findService("com.moe.util.MoeCommonUtilService") /> 
19<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService") /> 
20<#assign classNameId = classNameLocalService.getClassNameId("com.liferay.document.library.kernel.model.DLFileEntry") /> 
21<#assign dlFileEntry = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>  
22<#assign group_Id = themeDisplay.getScopeGroupId() /> 
23<#assign jls = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
24<#assign jARLService = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") /> 
25<#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
26<#assign journalArticleClassName = "com.liferay.journal.model.JournalArticle"/> 
27<#function getFileEntry fileJSONObject> 
28<#assign fileEntryUUID = fileJSONObject.getString("uuid") /> 
29<#if fileJSONObject.getLong("groupId") gt 0> 
30<#assign fileEntryGroupId = fileJSONObject.getLong("groupId") /> 
31<#else> 
32<#assign fileEntryGroupId = scopeGroupId /> 
33</#if> 
34<#attempt> 
35<#return dlAppServiceUtil.getFileEntryByUuidAndGroupId(fileEntryUUID, fileEntryGroupId)!""> 
36<#recover> 
37<#return ""> 
38</#attempt> 
39</#function> 
40<#function getFileJSONObject fieldValue> 
41<#return jsonFactoryUtil.createJSONObject(fieldValue)> 
42</#function> 
43<#function getFileEntryURL fileEntry> 
44<#return themeDisplay.getPathContext() + "/documents/" + fileEntry.getRepositoryId()?c + "/" + fileEntry.getFolderId()?c + "/" + urlCodec.encodeURL(htmlUtil.unescape(fileEntry.getTitle()), true) + "/" + fileEntry.getUuid()> 
45</#function> 
46<div class="filteration_form"> 
47   <div class="searchbar-container"><@liferay_portlet["runtime"] 
48      portletProviderAction=portletProviderAction.VIEW 
49      instanceId="publication-search-bar" 
50      portletName="com_liferay_portal_search_web_search_bar_portlet_SearchBarPortlet" 
51      /></div> 
52   <#--<div class="category-container"><@liferay_portlet["runtime"] 
53      instanceId="publication-month-listing" 
54      portletName="com_liferay_portal_search_web_category_facet_portlet_CategoryFacetPortlet" 
55      /></div>--> 
56   <div class="category-container"><@liferay_portlet["runtime"] 
57      portletProviderAction=portletProviderAction.VIEW 
58      instanceId="publication-year-listing" 
59      portletName="com_liferay_portal_search_web_tag_facet_portlet_TagFacetPortlet" 
60      /></div> 
61    <div class="search-icon"><i class="moeicon moeicon-search-02"></i></div> 
62</div> 
63<#if entries?has_content> 
64<div class="row"> 
65   <#list entries as entry> 
66   <div class="col-lg-6"> 
67      <#assign curArticle = jls.fetchLatestArticle(entry.getClassPK())  /> 
68      <#assign   
69      document = saxReaderUtil.read(curArticle.getContentByLocale(locale.toString())) 
70      rootElement = document.getRootElement() 
71      xPathSelectorIcon = saxReaderUtil.createXPath("dynamic-element[@name='link']") 
72      link = xPathSelectorIcon.selectSingleNode(rootElement).getStringValue()?trim 
73      xPathSelectorIcon = saxReaderUtil.createXPath("dynamic-element[@name='Date']") 
74      Date = xPathSelectorIcon.selectSingleNode(rootElement).getStringValue()?trim 
75      jsonData =  jsonFactoryUtil.createJSONObject(imageSrc) 
76      fileEntryId =  getterUtil.getInteger(jsonData.get('fileEntryId')) 
77      /> 
78      <#assign articlePrimKey = curArticle.getResourcePrimKey() /> 
79      <#assign articleCatNames = catLocalService.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong(articlePrimKey)) /> 
80      <#assign categoryList = "" /> 
81      <#if articleCatNames?? && articleCatNames?has_content> 
82      <#assign vocabLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") /> 
83      <#list articleCatNames as category> 
84      <#assign vocabName = vocabLocalService.getVocabulary(category.vocabularyId).getTitle("en_US") /> 
85      <#assign categoryName = category.getTitle(themeDisplay.getLocale()) /> 
86      <#assign categoryList = categoryList + (categoryList == "")?then(categoryName,", "+categoryName) /> 
87      </#list> 
88      </#if> 
89      <div class="media_publications"> 
90         <#assign groupId = 0> 
91         <#assign uuId = 0> 
92         <#assign downloadCount= 0 > 
93          
94         <#if link?? && link!=""> 
95         <#assign linkData = jsonFactoryUtil.createJSONObject(link) /> 
96         <#assign groupId = linkData.groupId?number> 
97         <#assign uuId = linkData.uuid> 
98         <#if (uuId?string?? && (uuId?string !="")) && (groupId??)> 
99         <#assign file = dlFileEntry.getFileEntryByUuidAndGroupId(uuId?string,groupId) >    
100         <#assign downloadCount= MoeCommonUtil.getDocumentDownloadCount(themeDisplay.getCompanyId(), file.getFileEntryId(), classNameId) >				 
101         </#if> 
102         </#if> 
103         <a href="${getFileEntryURL(file)}" download="" target="_blank"> 
104            <div class="custom_card custom_animation" style="transform: translate(0px, 0px); opacity: 1;"> 
105               <h4>${entry.getHighlightedTitle()}</h4> 
106               <#if categoryList !=""> 
107               <h5 class="hide">${categoryList}</h5> 
108               </#if> 
109               <div class="date"> 
110                  <i class="moeicon moeicon-calendar"><span class="path1"></span><span class="path2"></span></i> 
111                   
112                  <#assign month = dateUtil.getDate(curArticle.getCreateDate()?date, "MM", locale) /> 
113				  <#assign day = dateUtil.getDate(curArticle.getCreateDate()?date, "dd", locale) /> 
114				  <#assign year = dateUtil.getDate(curArticle.getCreateDate()?date, "yyyy", locale) /> 
115				  <#assign monthName = monthArr[month?number-1] /> 
116				  ${day} ${MoeLanguageUtil.get(request, "moe.label.month."+monthName)} ${year} 
117                   
118                  <#-- 
119                  <#if validator.isNotNull(Date)> 
120                  <#assign Date_DateObj = dateUtil.parseDate("yyyy-MM-dd",Date, locale)> 
121                  <#assign month = dateUtil.getDate(Date_DateObj, "MM", locale) /> 
122                  <#assign day = dateUtil.getDate(Date_DateObj, "dd", locale) /> 
123                  <#assign year = dateUtil.getDate(Date_DateObj, "yyyy", locale) /> 
124                  <#assign monthName = monthArr[month?number-1] /> 
125                  ${day} ${MoeLanguageUtil.get(request, "moe.label.month."+monthName)} ${year} 
126                  <#else> 
127                  <#assign aDateTime = .now?string["yyyy-MM-dd"]> 
128                  <#assign currentDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", aDateTime, locale)>												 
129                  <#assign month1 = dateUtil.getDate(currentDate_DateObj, "MM", locale) /> 
130                  <#assign day1 = dateUtil.getDate(currentDate_DateObj, "dd", locale) /> 
131                  <#assign year1 = dateUtil.getDate(currentDate_DateObj, "yyyy", locale) /> 
132                  <#assign monthName1 = monthArr[month1?number-1] /> 
133				   
134                  ${day1} ${MoeLanguageUtil.get(request, "moe.label.month."+monthName1)} ${year1}  
135				   
136                  </#if> 
137                   --> 
138               </div> 
139               <div class="downloads"> 
140                  <i class="moeicon moeicon-mc-download"><span class="path1"></span><span class="path2"></span></i>${MoeLanguageUtil.get(request, "moe.mediacentre.noofdownloads.label")}: ${downloadCount} 
141               </div> 
142            </div> 
143         </a> 
144      </div> 
145   </div> 
146   </#list> 
147</div> 
148</#if> 
149 
150<script> 
151    $(document).ready(function(){ 
152        $(".filteration_form .search-icon").on('click', function(){ 
153            $('.filteration_form').find('.searchbar-container form button').trigger('click');     
154        }) 
155    }) 
156</script> 

Asset Publisher

Communication Channels

Call centre and customer protection
 

What's New