Categories
Recent Posts
No results were found that matched the keywords:
.
An error occurred while processing the template.
?sort_by(...) failed at sequence index 0: The "publishDate" subvariable was null or missing. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign entries = entries?sort_by("pu... [in template "20099#20125#78867" at line 73, column 25] ----
1<#if !entries?has_content>
2 <#if !themeDisplay.isSignedIn()>
3 ${renderRequest.setAttribute("PORTLET_CONFIGURATOR_VISIBILITY", true)}
4 </#if>
5 <div class="alert alert-info">
6 <@liferay_ui["message"] key="there-are-no-results" />
7 </div>
8</#if>
9<script src="${themeDisplay.getPathThemeJavaScript()}/paginga.jquery.min.js"></script>
10<script>
11$(function() {
12 $(".paginate").paginga({
13 // use default options
14 itemsPerPage: 4,
15 itemsContainer: ".blog-items"
16 });
17
18 });
19</script>
20<style>
21.paginate .pager {
22 width: 100%;
23 display: flex;
24 text-align: center;
25 align-content: center;
26 justify-content: center;
27 font-size: 23px;
28}
29.paginate .pager div i { cursor: pointer; color: #434343; }
30.paginate .pager div i:hover { color: #000000; }
31.paginate .pager > div + div { margin-left: 20px; }
32.pageNumbers a {
33 width: 34px;
34 height: 34px;
35 font-size: 18px;
36 display: inline-block;
37 border-radius: 10px;
38 text-align: center;
39 line-height: 34px;
40 color: #cfa04f;
41 text-decoration: none;
42}
43.pageNumbers a.active, .pageNumbers a:hover { color: #ffffff; background: #cfa04f; }
44.pageNumbers a + a { margin-left: 10px; }
45@media screen and (max-width: 767px) {
46.paginate .pager { font-size: 18px; margin: 30px 0 50px; }
47.pageNumbers a { width: 28px; height: 28px; font-size: 18px; line-height: 28px; }
48}
49</style>
50<#assign sortValue = paramUtil.getString(request,"sort") />
51<#assign categoryIds = paramUtil.getLongValues(request,"category")/>
52<#assign orderValue = paramUtil.getString(request,"orders")/>
53<#assign my_list = "[" />
54<#if entries?has_content>
55 <#list entries as curEntry>
56 <#assign viewCount = curEntry.getViewCount() />
57 <#assign commentCount = commentManagerUtil.getCommentsCount(curEntry.getClassName(),curEntry.getClassPK()) />
58 <#assign curEntry1 = curEntry?replace("null","0")?replace("}","") + ","+"\"comment\"" + ":" + "${commentCount}" + "}" />
59 <#assign curEntry2 = curEntry1?replace("null","0")?replace("}","") + ","+"\"popular\"" + ":" + "${viewCount}" + "}" />
60 <#assign my_list = my_list + curEntry2 + "," >
61 </#list>
62 <#assign my_list = my_list + "]" />
63 <#assign final_string = my_list?keep_before_last(",") + my_list?keep_after_last(",") />
64</#if>
65
66<#if !sortValue?has_content && !categoryIds?has_content>
67 <#assign entries = entries?sort_by("publishDate")?reverse />
68 <#elseif !sortValue?has_content && categoryIds?has_content>
69 <#assign aeq = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery")/>
70 <#assign aeq1 = aeq.setAnyCategoryIds(categoryIds) />
71 <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")/>
72 <#assign entries = assetEntryLocalService.getEntries(aeq) />
73 <#assign entries = entries?sort_by("publishDate")?reverse />
74
75 <#elseif sortValue?has_content && !categoryIds?has_content>
76 <#if sortValue == "newest">
77 <#assign entries = entries?sort_by("publishDate")?reverse />
78 <#elseif sortValue == "oldest">
79 <#assign entries = entries?sort_by("publishDate") />
80 <#elseif sortValue =="comments">
81 <#assign entries1 = final_string?eval?sort_by("comment")?reverse />
82 <#assign entries = entries1 />
83 <#elseif sortValue =="popular">
84 <#assign entries1 = final_string?eval?sort_by("popular")?reverse />
85 <#assign entries = entries1 />
86 </#if>
87 <#elseif sortValue?has_content && categoryIds?has_content>
88 <#assign aeq = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery")/>
89 <#assign aeq1 = aeq.setAnyCategoryIds(categoryIds) />
90 <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")/>
91 <#assign entries = assetEntryLocalService.getEntries(aeq) />
92 <#if sortValue == "newest">
93 <#assign entries = entries?sort_by("publishDate")?reverse />
94 <#elseif sortValue == "oldest">
95 <#assign entries = entries?sort_by("publishDate") />
96 <#elseif sortValue =="comments">
97 <#assign my_list = "[" />
98 <#if entries?has_content>
99 <#list entries as curEntry>
100 <#assign viewCount = curEntry.getViewCount() />
101 <#assign commentCount = commentManagerUtil.getCommentsCount(curEntry.getClassName(),curEntry.getClassPK()) />
102 <#assign curEntry1 = curEntry?replace("null","0")?replace("}","") + ","+"\"comment\"" + ":" + "${commentCount}" + "}" />
103 <#assign curEntry2 = curEntry1?replace("null","0")?replace("}","") + ","+"\"popular\"" + ":" + "${viewCount}" + "}" />
104 <#assign my_list = my_list + curEntry2 + "," >
105 </#list>
106 <#assign my_list = my_list + "]" />
107 <#assign final_string = my_list?keep_before_last(",") + my_list?keep_after_last(",") />
108 </#if>
109 <#assign entries1 = final_string?eval?sort_by("comment")?reverse />
110 <#assign entries = entries1 />
111 <#elseif sortValue =="popular">
112 <#assign my_list = "[" />
113 <#if entries?has_content>
114 <#list entries as curEntry>
115 <#assign viewCount = curEntry.getViewCount() />
116 <#assign commentCount = commentManagerUtil.getCommentsCount(curEntry.getClassName(),curEntry.getClassPK()) />
117 <#assign curEntry1 = curEntry?replace("null","0")?replace("}","") + ","+"\"comment\"" + ":" + "${commentCount}" + "}" />
118 <#assign curEntry2 = curEntry1?replace("null","0")?replace("}","") + ","+"\"popular\"" + ":" + "${viewCount}" + "}" />
119 <#assign my_list = my_list + curEntry2 + "," >
120 </#list>
121 <#assign my_list = my_list + "]" />
122 <#assign final_string = my_list?keep_before_last(",") + my_list?keep_after_last(",") />
123 </#if>
124 <#assign entries1 = final_string?eval?sort_by("popular")?reverse />
125 <#assign entries = entries1 />
126 </#if>
127
128</#if>
129<#if orderValue=="asc">
130 <#assign entries = entries?reverse />
131</#if>
132<#if orderValue=="desc">
133 <#assign entries = entries />
134</#if>
135<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
136<div class="paginate 1">
137 <div class="blog-items">
138 <#list entries as entry1>
139 <#assign entry = AssetEntryLocalService.getEntry(entry1.entryId?number)/>
140
141 <#assign blogsEntryLocalService = serviceLocator.findService("com.liferay.blogs.service.BlogsEntryLocalService")>
142 <#assign
143 entry = entry
144 assetRenderer = entry.getAssetRenderer()
145 entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
146 curBlogEntry = blogsEntryLocalService.getEntry(entry.getClassPK())
147
148 viewURL = pageFriendlyURLConfigurationUtil.getPageFriendlyURL("blog-listing")
149 />
150 <#if validator.isNotNull(curBlogEntry.getUrlTitle())>
151 <#assign viewURL = pageFriendlyURLConfigurationUtil.getPageFriendlyURL("blog-detail")+"/-/blogs/${curBlogEntry.getUrlTitle()}?_com_liferay_blogs_web_portlet_BlogsPortlet_blogId=${entry.getClassPK()}" />
152 </#if>
153 <div class="bloglisting-box">
154
155 <div class="bloglisting-image"><a href="${viewURL}">
156 <#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
157 <#assign imageId = entry.getAssetRenderer().getAssetObject().getCoverImageFileEntryId() />
158 <#if imageId != 0>
159 <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntry(imageId) />
160 <img src ="/documents/${dlFileEntry.getRepositoryId()}/${dlFileEntry.getFolderId()}/${dlFileEntry.getFileName()}">
161 </#if>
162 </a>
163 </div>
164
165
166 <div class="bloglisting-info">
167 <@getMetadataField fieldName="author" />
168 <ul class="bloglisting-category">
169 <#assign categoryList=midasCommonUtil.fetchCategoriesByVocabularyName("blogs category", themeDisplay.getScopeGroupId())/>
170 <#assign assetEntryAssetCategoryService = serviceLocator.findService("com.liferay.asset.entry.rel.service.AssetEntryAssetCategoryRelLocalService")/>
171 <#assign assetEntryAssetCategoryList = assetEntryAssetCategoryService.getAssetEntryAssetCategoryRelsByAssetEntryId(entry.getEntryId()) />
172 <#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")/>
173 <#list assetEntryAssetCategoryList as assetEntryAssetCategory>
174 <#if categoryList?seq_contains(assetEntryAssetCategory.assetCategoryId)>
175 <#assign assetCategory = assetCategoryService.getCategory(assetEntryAssetCategory.assetCategoryId) />
176 <li>${assetCategory.name}</li>
177 </#if>
178 </#list>
179 </ul>
180 <div class="bloglisting-title"><a href="${viewURL}">${entryTitle}</a></div>
181 <div class="bloglisting-description">${htmlUtil.escape(assetRenderer.getSummary(renderRequest, renderResponse))}</div>
182 <span class="bloglisting-date">
183 <#if validator.isNotNull(curBlogEntry.displayDate)>
184 ${curBlogEntry.displayDate?datetime?string('dd MMM, yyyy')}
185 <#else>
186 ${curBlogEntry.statusDate?datetime?string('dd MMM, yyyy')}
187 </#if>
188 </span>
189 <div class="bloglisting-like-comment-share">
190 <div class="bloglisting-like"><@getRatings /></div>
191 <div class="bloglisting-comment"><span class="inline-item inline-item-before"><#if themeDisplay.isSignedIn()><a href="${viewURL}#blog-comments"></#if><i class="far fa-comment-dots"></i></a></span>${commentManagerUtil.getCommentsCount(entry.getClassName(),entry.getClassPK())}</div>
192 <div class="bloglisting-share"><@getSocialBookmarks /></div>
193 <div class="bloglisting-copy">
194 <input hidden="true" type="text" value="${themeDisplay.getURLPortal()}${viewURL}" id="myInput${entry.getClassPK()}">
195
196 <button onclick="copy('myInput${entry.getClassPK()}')"><i class="far fa-copy"></i></i></button></div>
197
198 </div>
199 </div></div>
200</#list>
201</div>
202<div class="pager">
203 <div class="firstPage"><i class="fas fa-chevron-double-left"></i></div>
204 <div class="previousPage"><i class="fas fa-chevron-left"></i></div>
205 <div class="pageNumbers"></div>
206 <div class="nextPage"><i class="fas fa-chevron-right"></i></div>
207 <div class="lastPage"><i class="fas fa-chevron-double-right"></i></div>
208</div>
209</div>
210<#macro getRatings>
211 <#if getterUtil.getBoolean(enableRatings) && assetRenderer.isRatable()>
212
213 <@liferay_ratings["ratings"]
214 className=entry.getClassName()
215 classPK=entry.getClassPK()
216 />
217
218 </#if>
219</#macro>
220<#macro getSocialBookmarks>
221 <@liferay_social_bookmarks["bookmarks"]
222 className=entry.getClassName()
223 classPK=entry.getClassPK()
224 displayStyle="${socialBookmarksDisplayStyle}"
225 target="_blank"
226 title=entry.getTitle(locale)
227 types="${socialBookmarksTypes}"
228 url=assetPublisherHelper.getAssetSocialURL(renderRequest, renderResponse, entry)
229 />
230</#macro>
231<#macro getMetadataField
232 fieldName
233>
234 <#if stringUtil.split(metadataFields)?seq_contains(fieldName)>
235 <span class="metadata-entry metadata-${fieldName}">
236 <#assign dateFormat = "dd MMM yyyy - HH:mm:ss" />
237 <#if stringUtil.equals(fieldName, "author")>
238 ${htmlUtil.escape(portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName()))}
239 <#elseif stringUtil.equals(fieldName, "categories")>
240 <@liferay_asset["asset-categories-summary"]
241 className=entry.getClassName()
242 classPK=entry.getClassPK()
243 portletURL=renderResponse.createRenderURL()
244 />
245 <#elseif stringUtil.equals(fieldName, "create-date")>
246 ${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)}
247 <#elseif stringUtil.equals(fieldName, "expiration-date")>
248 ${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale)}
249 <#elseif stringUtil.equals(fieldName, "modified-date")>
250 ${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)}
251 <#elseif stringUtil.equals(fieldName, "priority")>
252 ${entry.getPriority()}
253 <#elseif stringUtil.equals(fieldName, "publish-date")>
254 ${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}
255 <#elseif stringUtil.equals(fieldName, "tags")>
256 <@liferay_asset["asset-tags-summary"]
257 className=entry.getClassName()
258 classPK=entry.getClassPK()
259 portletURL=renderResponse.createRenderURL()
260 />
261 <#elseif stringUtil.equals(fieldName, "view-count")>
262 ${entry.getViewCount()} <@liferay.language key="views" />
263 </#if>
264 </span>
265 </#if>
266</#macro>
267<script>
268
269 var params_new = new URLSearchParams(window.location.search);
270 if(typeof(params_new.get('category'))=='string' || typeof(params_new.get('sort'))=='string'){
271
272 $([document.documentElement, document.body]).animate({
273 scrollTop: $(".blog-items").offset().top-170 }, 100);
274
275 }
276
277
278 if(window.location.href.indexOf('orders')>-1){
279 $([document.documentElement, document.body]).animate({
280 scrollTop: $(".blog-items").offset().top-170 }, 100);
281 }
282</script>
283<script>
284function copy(x) {
285 // Get the text field
286 var copyText = document.getElementById(x);
287 // Select the text field
288 copyText.select();
289 copyText.setSelectionRange(0, 99999); // For mobile devices
290 // Copy the text inside the text field
291 navigator.clipboard.writeText(copyText.value);
292}
293</script>
We are currently accepting new accounts by invitation only
Login
Enter your mobile number to proceed
Please enter the valid number
We are upgrading. For any requirement, please reach us at customercare@mmtcpamp.com. Thank you
We are currently accepting new accounts by invitation only
We are currently accepting new accounts by invitation only
Please enter the OTP sent to
Please enter the valid OTP
00:30
Successful!