Sample Category List
Malli töötlemisel tekkis viga.
The following has evaluated to null or missing: ==> serviceLocator [in template "38310#38349#3379185" at line 2, column 39] ---- 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 journalArticleLocalService = ... [in template "38310#38349#3379185" at line 2, column 1] ----
1<!-- Start of Global Variables-->
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
3<#assign saxReaderService = serviceLocator.findService("com.liferay.portal.kernel.xml.SAXReader")>
4<#assign validator = staticUtil["com.liferay.portal.kernel.util.Validator"]>
5<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"]>
6<#assign serviceContext = serviceContextThreadLocal.getServiceContext()>
7<#assign httpServletRequest = serviceContext.getRequest()>
8
9<#if httpServletRequest.getParameterValues('productFeatureKeys')?has_content>
10 <#assign productFeatureKeys = httpServletRequest.getParameterValues('productFeatureKeys')>
11<#else>
12 <#assign productFeatureKeys = "">
13</#if>
14<#if productFeatureKeys?has_content>
15 <#list productFeatureKeys as productFeatureKey>
16 <#assign productFeatureKeyList = productFeatureKey/>
17 </#list>
18</#if>
19
20<#if httpServletRequest.getParameter('productKey')?has_content>
21 <#assign productKey = httpServletRequest.getParameter('productKey')?string>
22<#else>
23 <#assign productKey = "">
24</#if>
25
26<#if httpServletRequest.getParameter('channel')?has_content>
27 <#assign channel = httpServletRequest.getParameter('channel')?string>
28<#else>
29 <#assign channel = "">
30</#if>
31
32<#if httpServletRequest.getParameter('locale')?has_content>
33 <#assign curr_locale = httpServletRequest.getParameter('locale')?string>
34<#else>
35 <#assign curr_locale = "">
36</#if>
37<!-- End of Global Variables-->
38
39<!DOCTYPE html>
40<html>
41<head>
42<meta name="viewport" content="width=device-width, initial-scale=1">
43<!-- Start of Category List Template Style-->
44<style type="text/css">
45 .sidenav-content {
46 position: relative !important;
47 padding-left: 0px !important;
48 overflow-x: hidden !important;
49 }
50 .panel-title {
51 margin-bottom: 2%;
52 }
53 .panel {
54 margin-bottom: 0%;
55 }
56 .panel-default {
57 border-radius: 0;
58 border-left: none;
59 border-right: none;
60 border-bottom: none;
61 margin-bottom: 0%;
62 }
63 .panel-default .panel-heading {
64 background-color: white;
65 }
66 .panel-default .panel-body {
67 border-top: 1px solid #D8D8D8;
68 background-color: #F7F7F7;
69 border-left: none;
70 border-right: none;
71 border-bottom: none;
72 }
73 .ltr {
74 display: none;
75 }
76 .control-menu {
77 display: none;
78 }
79 .sidenav-menu-slider {
80 display: none;
81 }
82 .breadcrumb {
83 display: none;
84 }
85 #breadcrumbs {
86 display: none;
87 }
88 .autofit-float {
89 display: none;
90 }
91 .control-menu {
92 display: none;
93 }
94 .control-menu {
95 display: none;
96 }
97 #navbar-custom {
98 display: none;
99 }
100 ::-webkit-scrollbar {
101 display:none;
102 width: 0px;
103 }
104 .portlet {
105 margin-bottom: 0px;
106 }
107 <#if channel == "" || channel == "ios">
108 .accordion-question {
109 padding-left: 26px;
110 }
111 .panel-heading .accordion-toggle.collapsed:before {
112 /* symbol for "collapsed" panels */
113 font-family: 'Glyphicons Halflings';
114 content: url(/documents/38345/118515/Right-7%401x.svg/f2caa825-48ec-4183-c2b0-9eb79fd56501?t=1618489554550);
115 padding-right: 23px;
116 font-size: 20px;
117 color: grey;
118 margin-top: -6px;
119 float:right;
120 }
121 <#else>
122 .accordion-question {
123 padding-left: 16px;
124 }
125 .panel-heading .accordion-toggle.collapsed:before {
126 /* symbol for "collapsed" panels */
127 font-family: 'Glyphicons Halflings';
128 content: url(/documents/38345/118507/arrow-right%401x.svg/d5632928-7d22-f6cc-336e-288deb0088ed?t=1618489234673);
129 padding-right: 20px;
130 font-size: 20px;
131 color: grey;
132 margin-top: -5px;
133 float:right;
134 }
135 </#if>
136 .accordion-question {
137 padding-top: 20px;
138 padding-bottom: 10px;
139 }
140 .accordion-question p {
141 color: #424242;
142 font-size: 16px;
143 letter-spacing: 0;
144 line-height: 22px;
145 margin-bottom: 0%;
146 padding-right: 61px
147 }
148 .portlet {
149 margin-bottom: 0px;
150 }
151</style>
152<!-- End of Category List Template Style-->
153</head>
154<body>
155<!-- Google Tag Manager (noscript) -->
156<noscript><iframe src=https://www.googletagmanager.com/ns.html?id=GTM-K9WGFNX
157height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
158<!-- End Google Tag Manager (noscript) -->
159
160<!-- Start of Category List creation-->
161<#if Category.getSiblings()?has_content>
162 <#list Category.getSiblings() as cur_Category>
163 <#assign webContentData = jsonFactoryUtil.createJSONObject(cur_Category.getData())/>
164 <#if webContentData.classPK?has_content>
165 <#assign resourcePrimaryKey = webContentData.classPK?number/>
166 <#assign categoryValue = ""/>
167 <#assign journalArticle = journalArticleLocalService.getLatestArticle(resourcePrimaryKey)/>
168 <#if curr_locale = "">
169 <#assign currentLocale = themeDisplay.getLocale()/>
170 <#else>
171 <#assign currentLocale = curr_locale/>
172 </#if>
173 <#assign categoryValue = journalArticle.getTitle(currentLocale)/>
174 </#if>
175 <#if productFeatureKeys?has_content && cur_Category.ProductFeature.getData()?has_content && cur_Category.ProductFeature.getData()?string!="na" >
176 <#list productFeatureKeyList?split(r'\s*,\s*', 'r') as productFeatureKey>
177 <#if productFeatureKey!= "" && cur_Category.ProductFeature.getData()?number==productFeatureKey?number>
178 <#if categoryValue == "" || !(categoryValue?has_content)>
179 <#assign categoryValue = webContentData.title/>
180 </#if>
181 <!-- Start of accordion display creation-->
182 <div class="panel panel-default hidden">
183 <div class="panel-heading">
184 <h4 class="panel-title">
185 <div class=accordion-question>
186 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion" onclick="redirectFAQ('${cur_Category.PageURL.getData()}','${curr_locale}','${channel}','${productKey}','${categoryValue}','${webContentData.title}')">
187 <p>${categoryValue}</p>
188 </a>
189 </div>
190 </h4>
191 </div>
192 </div>
193 </#if>
194 </#list>
195 <#elseif cur_Category.ProductFeature.getData()?string="" || cur_Category.ProductFeature.getData()?string=="na">
196 <!-- Start of accordion display creation-->
197 <#if categoryValue == "" || !(categoryValue?has_content)>
198 <#assign categoryValue = webContentData.title/>
199 </#if>
200 <div class="panel panel-default hidden">
201 <div class="panel-heading">
202 <h4 class="panel-title">
203 <div class=accordion-question>
204 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#accordion" onclick="redirectFAQ('${cur_Category.PageURL.getData()}','${curr_locale}','${channel}','${productKey}','${categoryValue}','${webContentData.title}')">
205 <p>${categoryValue}</p>
206 </a>
207 </div>
208 </h4>
209 </div>
210 </div>
211 </#if>
212 </#list>
213</#if>
214<!-- End of Category List creation-->
215
216<!-- Start of Javascript execution-->
217<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
218<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
219<!-- Global site tag (gtag.js) - Google Analytics -->
220<script async src="https://www.googletagmanager.com/gtag/js?id=UA-135803603-11"></script>
221<script>
222 window.dataLayer = window.dataLayer || [];
223 function gtag(){dataLayer.push(arguments);}
224 gtag('js', new Date());
225 gtag('config', 'UA-135803603-11');
226</script>
227<!-- Google Tag Manager -->
228<script>
229 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K9WGFNX');
230</script>
231<script>
232 function redirectFAQ(urlTitle,curr_locale,channel,productKey,categoryName,gaCategoryName){
233 var urlPath = urlTitle+'?locale='+curr_locale+'&channel='+channel+'&productKey='+productKey+'&categoryName='+categoryName;
234 executeGATag(gaCategoryName);
235 window.open(urlPath, "_self");
236 }
237 function executeGATag(gaCategoryName){
238 window.dataLayer.push({'eventCategory':'FAQTopic', 'eventAction':'Click', 'eventLabel':gaCategoryName});
239 }
240 (function($) {
241 $(window).load(function() {
242 $('.panel').removeClass('hidden');
243 $('.ltr').show();
244 });
245 })(jQuery);
246</script>
247<!-- End of Javascript execution-->
248</body>
249</html>