Fehler bei der Verarbeitung der Vorlage.
Error on line 237, column 5 in 635382#635420#782544
SuggestoRecommenderServiceAPI.search("635403","mongoSirmione","procedimenti",queryString,"",0,10) is undefined.
It cannot be assigned to items
1<!-- 
2  PA-SECTION-TPL 
3  v1.10 29/06/2017 
4 
5  https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portal/service/LayoutLocalService.html 
6  https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portal/model/Layout.html 
7  https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portal/theme/ThemeDisplay.html 
8 
9  Riferimenti: https://italia.github.io/ita-web-toolkit/ 
10--> 
11 
12<style> 
13  name { 
14      font-size: 18px; 
15
16</style> 
17 
18<!--categorie dell'articolo  --> 
19<#assign journalLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
20<#assign articlePrimKey = journalLocalService.getArticle(getterUtil.getLong(groupId), .vars['reserved-article-id'].data).resourcePrimKey> 
21<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService")> 
22<#assign artPrimKeyLong=getterUtil.getLong(articlePrimKey)> 
23<#assign articleCats = AssetCategoryLocalService.getCategoryNames("com.liferay.portlet.journal.model.JournalArticle",artPrimKeyLong )> 
24<#assign OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"]> 
25<#assign categoriesOrderBy = OrderByComparatorFactoryUtil.create("AssetCategory", ["title ASC", false])> 
26<#assign articleId = .vars['reserved-article-id'].data> 
27 
28<!--vocabolario "tematiche" del sito --> 
29<#assign thereistematiche="false"> 
30<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService")> 
31<#assign listVocabularies = AssetVocabularyLocalService.getGroupVocabularies(groupId)> 
32 
33<#if listVocabularies?has_content> 
34    <#list listVocabularies as vocabolary> 
35    <#--  lettura di tutte le categorie del vocabolario "tematiche --> 
36    <#if vocabolary.getName() == "tematiche"> 
37        <#assign thereistematiche="true"> 
38        <#assign vocabularyid=vocabolary.getVocabularyId()> 
39        <#assign categoryList = AssetCategoryLocalService.getVocabularyCategories(vocabularyid, -1, -1, categoriesOrderBy )> 
40    </#if> 
41    </#list> 
42</#if> 
43 
44<#assign plid = request["theme-display"].plid?number > 
45<#assign scopeGroupId = portalUtil.getScopeGroupId(plid)> 
46<#assign LLS = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") > 
47<#assign curLayout = LLS.getLayout(plid) > 
48<#assign layoutId = curLayout.layoutId?number > 
49<#assign lsLayouts = LLS.getLayouts(scopeGroupId,false,layoutId, false,0,99999) > 
50<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 
51<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
52<#assign pfup = themeDisplay.getPathFriendlyURLPublic() /> 
53 
54<#assign curURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() /> 
55<#assign curHTMLTitle = curLayout.getHTMLTitle("it_IT") /> 
56 
57<#assign baseUrl = pfup + curLayout.getGroup().friendlyURL > 
58 
59<#assign baseUrl = "" > 
60 
61 
62<!--  
63  DEBUG 
64  curURL ${curURL} 
65  pfup ${pfup} 
66  baseUrl ${baseUrl} 
67  themeDisplay.getPortalURL() ${themeDisplay.getPortalURL()} 
68  curLayout.getName() ${curLayout.getName()} 
69  curLayout.getFriendlyURL() ${curLayout.getFriendlyURL()} 
70 
71  curLayout.getHTMLTitle("it_IT") ${curLayout.getHTMLTitle("it_IT")} 
72 
73--> 
74 
75<#-- list lsLayouts as aLayout> 
76  ${aLayout.getName()} <br/> 
77  ${aLayout.getFriendlyURL()} <br/> 
78</#list --> 
79 
80<section> 
81    <div class="u-layout-wide u-layoutCenter u-layout-withGutter u-padding-r-top u-padding-bottom-xxl"> 
82      <h1 class="u-text-h2"> 
83        ${section_title.getData()} 
84      </h1> 
85 
86      <div class="Grid Grid--withGutter"> 
87        <div class="Grid-cell u-md-size8of12 u-lg-size8of12"> 
88          <article class="Prose"> 
89            <#if immagineDL?? > 
90                <#if immagineDL.data?has_content> 
91                   <img style="max-width: 100%;" class="u-padding-bottom-xxl" alt="Immagine" src="${immagineDL.getData()}" /> 
92                </#if> 
93            </#if> 
94 
95            ${section_content.getData()} 
96            <#if allegati.getData()?has_content> 
97              <h4>Allegati</h4> 
98              <ul> 
99                <#list allegati.getSiblings() as allegato> 
100                  <#if allegato.titolo_allegato ??> 
101                    <li class="allegato"> 
102                      <a target="_blank"  href="${allegato.getData()}">${allegato.titolo_allegato.getData()}</a><!-- ${allegato.toString()} --> 
103                    </li> 
104                  </#if> 
105                </#list> 
106              </ul> 
107            </#if> 
108 
109          </article> 
110 
111          <!-- form search --> 
112 
113          <!-- bottom links to globo start --> 
114          <@bottomLinksGlobo /> 
115          <!-- bottom links to globo end --> 
116 
117        </div><!-- --> 
118        <div class="Grid-cell u-sizeFull u-md-size4of12 u-lg-size4of12"> 
119          <!-- share block -->  
120          <div class="u-cf u-padding-bottom-xxl"> 
121            <div class="Share"> 
122              <div class="Share-reveal js-Share"> 
123                <a href="#share-options" class="Share-revealText" data-menu-trigger="share-options"> 
124                  <span class="Share-revealIcon Icon Icon-share"></span> Condividi 
125                </a> 
126              </div> 
127              <ul id="share-options" class="Dropdown-menu" data-menu> 
128                <li><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=${curURL}" title=""><span class="Icon Icon-facebook"></span><span class="u-hiddenVisually">Facebook</span></a></li> 
129                <li><a target="_blank" href="http://www.twitter.com/share?text=${curHTMLTitle}&url=${curURL}"><span class="Icon Icon-twitter"></span><span class="u-hiddenVisually">Twitter</span></a></li> 
130                <li><a target="_blank" href="https://plus.google.com/share?url=${curURL}"><span class="Icon Icon-googleplus"></span><span class="u-hiddenVisually">Google Plus</span></a></li> 
131              </ul> 
132            </div> 
133          </div> 
134 
135          <!-- right links  --> 
136          <div class="u-sizeFull u-md-size11of12 u-lg-size11of12" id="subnav"> 
137            <ul class="Linklist Linklist--padded u-layout-prose u-text-r-xs u-textWeight-700 u-background-grey-20"> 
138 
139              <#if lsLayouts?has_content> 
140                <#list lsLayouts as aLayout> 
141                  <#if aLayout.getHidden() == false> 
142                  <!-- ${aLayout.getFriendlyURL()} --> 
143                    <li class="subpages"><a href="${baseUrl}${aLayout.getFriendlyURL()}">${aLayout.getName()}</a></li> 
144                  </#if>   
145                </#list> 
146              </#if> 
147 
148              <#if link_int_title.getSiblings()?has_content> 
149                <#list link_int_title.getSiblings() as cur_link_int_title> 
150                   <#if cur_link_int_title.getData() != "" > 
151                     <li class="intlink"><a href="${cur_link_int_title.link_int_url.getFriendlyUrl()}">${cur_link_int_title.getData()}</a></li> 
152                   </#if>   
153                </#list> 
154              </#if> 
155             
156              <#if link_ext_title.getSiblings()?has_content> 
157                <#list link_ext_title.getSiblings() as cur_link_ext_title> 
158                  <#if cur_link_ext_title.getData() != "" > 
159                    <li class="extlink"><a href="${cur_link_ext_title.link_ext_url.getData()}">${cur_link_ext_title.getData()}</a></li> 
160                  </#if>  
161                </#list> 
162              </#if> 
163               
164            </ul> 
165 
166          </div> 
167          <a href="#" title="torna all'inizio del contenuto" class="u-hiddenVisually"><b>torna all'inizio del contenuto</b></a> 
168        </div> 
169      </div> 
170    </div> 
171  </section> 
172                 
173<#macro bottomLinksGlobo > 
174    <#assign suggestoMkspAPI = serviceLocator.findService("suggesto-mksp-portlet","eu.suggesto.marketspace.service.MkspDockbarLocalService")> 
175    <#assign defLocale=localeUtil.fromLanguageId("it_IT")> 
176    <#assign SuggestoRecommenderServiceAPI = serviceLocator.findService("suggestocs-portlet","eu.suggesto.servicecs.service.SuggestoRecommenderService")> 
177    <#assign SuggestoCSServiceAPI = serviceLocator.findService("suggestocs-portlet","eu.suggesto.servicecs.service.SuggestoCSService")> 
178    <#assign curArtId = articleId> 
179    <#assign gcQry = ""> 
180 
181    <#assign groupedCategories=suggestoMkspAPI.getGroupedArticleCategories(groupId,curArtId,locale,defLocale)> 
182    <#if groupedCategories.length() &gt; 0 > 
183      <#assign gcSep = ""> 
184 
185      <#list 0..groupedCategories.length()-1 as i> 
186        <#assign gc = groupedCategories.getJSONObject(i)> 
187        <#assign gcCat = gc.getJSONArray("categories")> 
188               <div style="display:none">gc:${gc}</div> 
189         
190        <#if gc.getString("vocabularyName") == "Ambito"> 
191          <#list 0..gcCat.length()-1 as y> 
192              <#assign sCat = gcCat.getJSONObject(y)> 
193              <#assign gcQry = gcQry + gcSep + "{\"Ambito\":\""+sCat.getString("name")+"\"}" > 
194              <#assign gcSep = "," > 
195          </#list> 
196        </#if> 
197 
198        <#if gc.getString("vocabularyName") == "Adatto a"> 
199          <#list 0..gcCat.length()-1 as y> 
200              <#assign sCat = gcCat.getJSONObject(y)> 
201              <#if sCat.getString("name") == "Impresa" > 
202                <#assign gcQry = gcQry + gcSep + "{\"adattoAImpresa\":true}" > 
203              </#if> 
204              <#if sCat.getString("name") == "PA" > 
205                <#assign gcQry = gcQry + gcSep + "{\"adattoAPA\":true}" > 
206              </#if> 
207              <#if sCat.getString("name") == "Professionista" > 
208                <#assign gcQry = gcQry + gcSep + "{\"adattoAProfessionista\":true}" > 
209              </#if> 
210              <#if sCat.getString("name") == "Visitatore" > 
211                <#assign gcQry = gcQry + gcSep + "{\"adattoAVisitatore\":true}" > 
212              </#if> 
213              <#if sCat.getString("name") == "Cittadino" > 
214                <#assign gcQry = gcQry + gcSep + "{\"adattoAcittadino\":true}" > 
215              </#if> 
216              <#assign gcSep = "," > 
217          </#list> 
218        </#if> 
219 
220        <#if gc.getString("vocabularyName") == "Ufficio"> 
221          <#list 0..gcCat.length()-1 as y> 
222              <#assign sCat = gcCat.getJSONObject(y)> 
223               <div style="display:none">sCat:${sCat}</div> 
224              <#assign gcQry = gcQry + gcSep + "{\"ufficio\":\""+ sCat.getString("name")+"\"}" > 
225              <#assign gcSep = "," > 
226          </#list> 
227        </#if> 
228         
229      </#list> 
230    </#if>   
231    <#if gcQry?has_content> 
232        <#assign queryString = "{$or: ["+gcQry +"]}"> 
233    <#else> 
234         <#assign gcQry =  "{\"ufficio\":\"12345\"}" > 
235        <#assign queryString = "{$or: ["+gcQry +"]}"> 
236    </#if> 
237    <#assign items = SuggestoRecommenderServiceAPI.search("635403","mongoSirmione","procedimenti",queryString,"",0,10)> 
238    <div style="display:none">XXX:${queryString}</div> 
239    <script> 
240      var jsCategories = ${groupedCategories.toString()}; 
241      var jsProcedimenti = ${items.toString()}; 
242      var jsQry = '{$or: [ ${gcQry}]}'; 
243      var artId = '${articleId}'; 
244    </script>    
245    <#if items.getInt("items") gt 0  >  
246      <table class="Table Table--striped Table--hover Table--withBorder"> 
247        <thead> 
248            <tr class="u-border-bottom-xs"> 
249                <th class="u-textLeft">Descrizione</th> 
250                <th class="u-textLeft">Ambito</th> 
251            </tr> 
252        </thead> 
253        <tbody> 
254        <#if items.getJSONObject("data")?has_content> 
255            <#assign docs = items.getJSONObject("data").getJSONArray("items")> 
256            <#list 0..docs.length()-1 as i > 
257                <#if docs.getJSONObject(i)?has_content > 
258                    <#assign doc = docs.getJSONObject(i) > 
259                    <#assign glURL = doc.getString("URL") > 
260                    <#assign glTitolo = doc.getString("Titolo") > 
261                    <#assign glAmbito = doc.getString("Ambito") > 
262                    <tr> 
263                        <td class="u-textLeft"><a href="${glURL}">${glTitolo}</a></td> 
264                        <td class="u-textLeft">${glAmbito}</td> 
265                    </tr> 
266                </#if> 
267            </#list> 
268        </#if> 
269       
270         </tbody> 
271      </table> 
272      <br/> 
273      <p class="u-textCenter u-text-md-right u-text-lg-right u-padding-r-top"> 
274        <a href="/ricerca#?ppn=1&fgl" class="u-color-50 u-textClean u-text-h4"> 
275          Vedi tutti <span class="Icon Icon-chevron-right"></span></a> 
276      </p> 
277       
278    </#if>   
279</#macro> 

torna all'inizio del contenuto