တိုင်းဒေသကြီးနှင့် ပြည်နယ်အစိုးရအဖွဲ့
An error occurred while processing the template.
The following has evaluated to null or missing:
==> categoryIds[0] [in template "20116#20152#90830" at line 14, column 30]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to be 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: categoryId = categoryIds[0]?number [in template "20116#20152#90830" at line 14, column 17]
- Reached through: #assign-container [in template "20116#20152#90830" at line 7, column 1]
----
1<section id="team" class="nation-detail-pd section-bg">
2 <div class="container-fluid">
3
4 <div class="row">
5
6<#if entries?has_content>
7<#assign
8 utilLocalService= serviceLocator.findService("service.service.UtilLocalService")
9 base32Service= serviceLocator.findService("mnp.custom.service.base32.Base32Service")
10 localizationService = serviceLocator.findService("com.liferay.portal.kernel.util.LocalizationUtil")
11 childrenFriendlyUrlList = utilLocalService.getFriendlyUrlsByParentLayoutIdAsLocal(layout.getLayoutId(),themeDisplay.getCompanyId(),themeDisplay.getScopeGroupId())
12 newHash = {}
13 categoryIds = utilLocalService.getCategoryByFriendlyUrlAsLocal(base32Service.encodeBase32(themeDisplay.getLayout().getFriendlyURL(locale)))
14 categoryId = categoryIds[0]?number
15 listResult = utilLocalService.getCategoryListByParentCategoryIdAsLocal(categoryId, themeDisplay.getCompanyId(), themeDisplay.getScopeGroupId(), "isDisplay", base32Service.encodeBase32("true"))
16
17 />
18 <#list listResult as result >
19 <#assign
20 newHash = newHash + {result[0]:{}}
21 />
22
23 </#list>
24
25 <#list listResult as result >
26 <#assign
27 myHash = { 'title':result[1], result[3]:result[4] }
28 />
29 <#list newHash?keys as key>
30 <#if key?string == result[0]?string>
31 <#if newHash[key]?has_content>
32 <#assign
33 value = newHash[key]
34 value = value + myHash
35 newHash = newHash + {key:value}
36 />
37
38 <#else>
39 <#assign
40 newHash = newHash + {key:myHash}
41 />
42
43 </#if>
44 </#if>
45 </#list>
46 </#list>
47 <#list childrenFriendlyUrlList as childFriendlyUrl>
48 <#list newHash?keys as key>
49 <#assign value = newHash[key] >
50 <#list value?keys as k>
51 <#if k?string == "image">
52 <#assign urlImage = base32Service.decodeBase32(value[k])>
53 </#if>
54 <#if k?string == "title">
55 <#assign title = value[k]>
56 </#if>
57 <#if k?string == "link">
58 <#assign link = base32Service.decodeBase32(value[k])>
59 </#if>
60 </#list>
61
62 <#if link == childFriendlyUrl>
63
64 <div class="col-lg-4 col-md-6 d-flex align-items-stretch" data-aos-delay="100">
65 <div class="nation-detail">
66 <a href="${link}">
67 <div class="nation-detail-img popup-gallery">
68 <img src="${urlImage}" class="union-img-fluid" alt="">
69 </div>
70 <div class="nation-detail-info">
71 <span>${localizationService.getLocalization(title,locale)}</span>
72 </div>
73 </a>
74 </div>
75
76 </div>
77
78
79
80
81 </#if>
82 </#list>
83 </#list>
84<#else>
85 <h1>${themeDisplay.translate("mnp-no-data-available")}</h1>
86</#if>
87
88 </div>
89 </div>
90</section>
91
92<style>
93
94.union-img-fluid {
95
96 max-width: 60%;
97 height: auto;
98
99}
100
101</style>
