An error occurred while processing the template.
Error on line 313, column 5 in 635382#635420#800347
SuggestoRecommenderServiceAPI.search("635403","mongoSirmione","procedimenti",queryString,"",0,10) is undefined.
It cannot be assigned to items
1<#-- 
2  PA-UFFICIO-TPL 
3  v1.10 04/07/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<style> 
10  name { 
11      font-size: 18px; 
12
13</style> 
14 
15<!--categorie dell'articolo  --> 
16<#assign journalLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
17<#assign articlePrimKey = journalLocalService.getArticle(getterUtil.getLong(groupId), .vars['reserved-article-id'].data).resourcePrimKey> 
18<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService")> 
19<#assign artPrimKeyLong=getterUtil.getLong(articlePrimKey)> 
20<#assign articleCats = AssetCategoryLocalService.getCategoryNames("com.liferay.portlet.journal.model.JournalArticle",artPrimKeyLong )> 
21<#assign OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"]> 
22<#assign categoriesOrderBy = OrderByComparatorFactoryUtil.create("AssetCategory", ["title ASC", false])> 
23<#assign articleId = .vars['reserved-article-id'].data> 
24 
25<!--vocabolario "tematiche" del sito --> 
26<#assign thereistematiche="false"> 
27<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService")> 
28<#assign listVocabularies = AssetVocabularyLocalService.getGroupVocabularies(groupId)> 
29 
30<#if listVocabularies?has_content> 
31    <#list listVocabularies as vocabolary> 
32    <#--  lettura di tutte le categorie del vocabolario "tematiche --> 
33    <#if vocabolary.getName() == "tematiche"> 
34        <#assign thereistematiche="true"> 
35        <#assign vocabularyid=vocabolary.getVocabularyId()> 
36        <#assign categoryList = AssetCategoryLocalService.getVocabularyCategories(vocabularyid, -1, -1, categoriesOrderBy )> 
37    </#if> 
38    </#list> 
39</#if> 
40 
41<#assign plid = request["theme-display"].plid?number > 
42<#assign scopeGroupId = portalUtil.getScopeGroupId(plid)> 
43<#assign LLS = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") > 
44<#assign curLayout = LLS.getLayout(plid) > 
45<#assign layoutId = curLayout.layoutId?number > 
46<#assign lsLayouts = LLS.getLayouts(scopeGroupId,false,layoutId, false,0,99999) > 
47<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 
48<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
49<#assign pfup = themeDisplay.getPathFriendlyURLPublic() /> 
50 
51<#assign curURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() /> 
52<#assign curHTMLTitle = curLayout.getHTMLTitle("it_IT") /> 
53 
54<#--assign baseUrl = pfup + curLayout.getGroup().friendlyURL --> 
55 
56<#assign baseUrl = "" > 
57 
58 
59<!--  
60  DEBUG 
61  curURL ${curURL} 
62  pfup ${pfup} 
63  baseUrl ${baseUrl} 
64  themeDisplay.getPortalURL() ${themeDisplay.getPortalURL()} 
65  curLayout.getName() ${curLayout.getName()} 
66  curLayout.getFriendlyURL() ${curLayout.getFriendlyURL()} 
67 
68  curLayout.getHTMLTitle("it_IT") ${curLayout.getHTMLTitle("it_IT")} 
69 
70--> 
71 
72<#-- list lsLayouts as aLayout> 
73  ${aLayout.getName()} <br/> 
74  ${aLayout.getFriendlyURL()} <br/> 
75</#list --> 
76 
77<section> 
78    <div class="u-layout-wide u-layoutCenter u-layout-withGutter u-padding-r-top u-padding-bottom-xxl"> 
79      <h1 class="u-text-h2"> 
80        ${section_title.getData()} 
81      </h1> 
82 
83      <div class="Grid Grid--withGutter"> 
84        <div class="Grid-cell u-md-size8of12 u-lg-size8of12"> 
85          <article class="Prose"> 
86            <#if immagineDL?? > 
87                <#if immagineDL.data?has_content> 
88                   <img style="max-width: 100%;" class="u-padding-bottom-xxl" alt="Immagine" src="${immagineDL.getData()}" /> 
89                </#if> 
90            </#if> 
91          </article> 
92          <div class="Color u-padding-all-s u-borderRadius-xxs u-background-5"><!-- start resp, contact --> 
93            <article class="Prose"> 
94               
95 
96              <#if responsabileSettore.getData()?has_content >   
97                <div class="Grid Grid--withGutter">  
98                  <div class="Grid-cell u-padding-all-s u-md-size4of12 u-lg-size4of12 "> 
99                      <p><b>RESPONSABILE DEL SETTORE:</b></p> 
100                  </div> 
101                  <div class="Grid-cell u-padding-all-s u-md-size8of12 u-lg-size8of12 "> 
102                      <p>${responsabileSettore.getData()}</p> 
103                  </div> 
104                </div>   
105              </#if> 
106 
107              <#if altriReferenti?has_content >  
108                <#if altriReferenti.getSiblings()?has_content>  
109                  <div class="Grid Grid--withGutter">  
110                    <div class="Grid-cell u-padding-all-s u-md-size4of12 u-lg-size4of12 "> 
111                        <p><b>ALTRI REFERENTI:</b></p> 
112                    </div> 
113                    <div class="Grid-cell u-padding-all-s u-md-size8of12 u-lg-size8of12 "> 
114                        <#list altriReferenti.getSiblings() as cur_altriReferenti> 
115                          ${cur_altriReferenti.getData()}<br/> 
116                        </#list> 
117                    </div> 
118                  </div>   
119                </#if> 
120              </#if> 
121 
122              <#if Indirizzo?has_content>  
123                <div class="Grid Grid--withGutter">  
124                  <div class="Grid-cell u-padding-all-s u-md-size4of12 u-lg-size4of12 "> 
125                      <p><b>INDIRIZZO:</b></p> 
126                  </div> 
127                  <div class="Grid-cell u-padding-all-s u-md-size8of12 u-lg-size8of12 "> 
128                      <#if Indirizzo.Indirizzo_1?has_content> 
129                      <p>${Indirizzo.Indirizzo_1.getData()}</p> 
130                      </#if> 
131                      <#if Indirizzo.Indirizzo_2?has_content> 
132                      <p>${Indirizzo.Indirizzo_2.getData()}</p> 
133                      </#if> 
134                  </div> 
135                </div>   
136              </#if> 
137 
138              <div class="Grid Grid--withGutter"> <!-- start grid contatti orari --> 
139                <div class="Grid-cell u-padding-all-s u-md-size4of12 u-lg-size4of12 "><!-- start orari --> 
140                  <b>Orari</b><br/> 
141                  <#if Orari.orario.getSiblings()?has_content> 
142                    <ul> 
143                    <#list Orari.orario.getSiblings() as item> 
144                      <li>${item.getData()}</li> 
145                    </#list> 
146                    </ul> 
147                  </#if> 
148                </div><!-- end orari --> 
149 
150                <div class="Grid-cell u-padding-all-s u-md-size8of12 u-lg-size8of12 "><!-- start contatti --> 
151                  <b>Contatti</b><br/> 
152                  <ul> 
153                    <#if Contatti?has_content > 
154                      <#if Contatti.nrtel?has_content > 
155                      <li>Tel. ${Contatti.nrtel.getData()}</li> 
156                      </#if> 
157                      <#if Contatti.nrfax?has_content > 
158                      <li>Fax. ${Contatti.nrfax.getData()}</li> 
159                      </#if> 
160                      <#if Contatti.email?has_content > 
161                      <li>EMail. ${Contatti.email.getData()}</li> 
162                      </#if> 
163                      <#if Contatti.pec?has_content > 
164                      <li>PEC. ${Contatti.pec.getData()}</li> 
165                      </#if> 
166                    </#if> 
167                  </ul> 
168                </div><!-- end contatti --> 
169              </div><!-- end grid contatti orari --> 
170            </article> 
171          </div><!-- end resp, contact --> 
172          <br /> 
173          <article class="Prose"> 
174            ${section_content.getData()} 
175            <#if allegati.getData()?has_content> 
176              <h4>Allegati</h4> 
177              <ul> 
178                <#list allegati.getSiblings() as allegato> 
179                  <#if allegato.titolo_allegato ??> 
180                    <li class="allegato"> 
181                      <a target="_blank"  href="${allegato.getData()}">${allegato.titolo_allegato.getData()}</a><!-- ${allegato.toString()} --> 
182                    </li> 
183                  </#if> 
184                </#list> 
185              </ul> 
186            </#if> 
187 
188          </article> 
189 
190          <!-- form search --> 
191 
192          <!-- bottom links to globo start --> 
193          <!-- @bottomLinksGlobo / --> 
194          <!-- bottom links to globo end --> 
195 
196        </div><!-- --> 
197        <div class="Grid-cell u-sizeFull u-md-size4of12 u-lg-size4of12"> 
198          <!-- share block -->  
199          <div class="u-cf u-padding-bottom-xxl"> 
200            <div class="Share"> 
201              <div class="Share-reveal js-Share"> 
202                <a href="#share-options" class="Share-revealText" data-menu-trigger="share-options"> 
203                  <span class="Share-revealIcon Icon Icon-share"></span> Condividi 
204                </a> 
205              </div> 
206              <ul id="share-options" class="Dropdown-menu" data-menu> 
207                <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> 
208                <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> 
209                <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> 
210              </ul> 
211            </div> 
212          </div> 
213 
214          <!-- right links --> 
215          <div class="u-sizeFull u-md-size11of12 u-lg-size11of12" id="subnav"> 
216            <ul class="Linklist Linklist--padded u-layout-prose u-text-r-xs u-textWeight-700 u-background-grey-20"> 
217 
218              <#if lsLayouts?has_content> 
219                <#list lsLayouts as aLayout> 
220                  <#if aLayout.getHidden() == false> 
221                    <li class="subpages"><a href="${baseUrl}${aLayout.getFriendlyURL()}">${aLayout.getName()}</a></li> 
222                  </#if>   
223                </#list> 
224              </#if> 
225 
226              <#if link_int_title.getSiblings()?has_content> 
227                <#list link_int_title.getSiblings() as cur_link_int_title> 
228                   <#if cur_link_int_title.getData() != "" > 
229                     <li class="intlink"><a href="${cur_link_int_title.link_int_url.getFriendlyUrl()}">${cur_link_int_title.getData()}</a></li> 
230                   </#if>   
231                </#list> 
232              </#if> 
233             
234              <#if link_ext_title.getSiblings()?has_content> 
235                <#list link_ext_title.getSiblings() as cur_link_ext_title> 
236                  <#if cur_link_ext_title.getData() != "" > 
237                    <li class="extlink"><a href="${cur_link_ext_title.link_ext_url.getData()}">${cur_link_ext_title.getData()}</a></li> 
238                  </#if>  
239                </#list> 
240              </#if> 
241 
242              <@rightLinksGlobo /> 
243               
244            </ul> 
245 
246          </div> 
247          <a href="#" title="torna all'inizio del contenuto" class="u-hiddenVisually"><b>torna all'inizio del contenuto</b></a> 
248        </div> 
249      </div> 
250    </div> 
251  </section> 
252                 
253<#macro rightLinksGlobo > 
254    <#assign suggestoMkspAPI = serviceLocator.findService("suggesto-mksp-portlet","eu.suggesto.marketspace.service.MkspDockbarLocalService")> 
255    <#assign defLocale=localeUtil.fromLanguageId("it_IT")> 
256    <#assign SuggestoRecommenderServiceAPI = serviceLocator.findService("suggestocs-portlet","eu.suggesto.servicecs.service.SuggestoRecommenderService")> 
257    <#assign SuggestoCSServiceAPI = serviceLocator.findService("suggestocs-portlet","eu.suggesto.servicecs.service.SuggestoCSService")> 
258    <#assign curArtId = articleId> 
259    <#assign gcQry = ""> 
260    <#assign gcAmbitoID = "All"> 
261     
262    <#assign groupedCategories=suggestoMkspAPI.getGroupedArticleCategories(groupId,curArtId,locale,defLocale)> 
263    <#if groupedCategories.length() &gt; 0 > 
264      <#assign gcSep = ""> 
265 
266      <#list 0..groupedCategories.length()-1 as i> 
267        <#assign gc = groupedCategories.getJSONObject(i)> 
268        <#assign gcCat = gc.getJSONArray("categories")> 
269         
270        <#if gc.getString("vocabularyName") == "Ambito"> 
271          <#list 0..gcCat.length()-1 as y> 
272              <#assign sCat = gcCat.getJSONObject(y)> 
273              <#assign gcQry = gcQry + gcSep + "{\"Ambito\":\""+sCat.getString("name")+"\"}" > 
274              <#assign gcSep = "," > 
275              <#assign gcAmbitoID = sCat.getString("icon")> 
276          </#list> 
277        </#if> 
278 
279        <#if gc.getString("vocabularyName") == "Adatto a"> 
280          <#list 0..gcCat.length()-1 as y> 
281              <#assign sCat = gcCat.getJSONObject(y)> 
282              <#if sCat.getString("name") == "Impresa" > 
283                <#assign gcQry = gcQry + gcSep + "{\"adattoAImpresa\":true}" > 
284              </#if> 
285              <#if sCat.getString("name") == "PA" > 
286                <#assign gcQry = gcQry + gcSep + "{\"adattoAPA\":true}" > 
287              </#if> 
288              <#if sCat.getString("name") == "Professionista" > 
289                <#assign gcQry = gcQry + gcSep + "{\"adattoAProfessionista\":true}" > 
290              </#if> 
291              <#if sCat.getString("name") == "Visitatore" > 
292                <#assign gcQry = gcQry + gcSep + "{\"adattoAVisitatore\":true}" > 
293              </#if> 
294              <#if sCat.getString("name") == "Cittadino" > 
295                <#assign gcQry = gcQry + gcSep + "{\"adattoAcittadino\":true}" > 
296              </#if> 
297              <#assign gcSep = "," > 
298          </#list> 
299        </#if> 
300 
301        <#if gc.getString("vocabularyName") == "Ufficio"> 
302          <#list 0..gcCat.length()-1 as y> 
303              <#assign sCat = gcCat.getJSONObject(y)> 
304              <#assign gcQry = gcQry + gcSep + "{\"ufficio\":\""+ sCat.getString("name")+"\"}" > 
305              <#assign gcSep = "," > 
306          </#list> 
307        </#if> 
308         
309      </#list> 
310    </#if>   
311 
312    <#assign queryString = "{$or: ["+gcQry +"]}"> 
313    <#assign items = SuggestoRecommenderServiceAPI.search("635403","mongoSirmione","procedimenti",queryString,"",0,10)> 
314    <script> 
315      var jsCategories = ${groupedCategories.toString()}; 
316      var jsProcedimenti = ${items.toString()}; 
317      var jsQry = '{$or: [ ${gcQry}]}'; 
318      var artId = '${articleId}'; 
319    </script>    
320    <#if items.getInt("items") gt 0  >  
321      <#if items.getJSONObject("data")?has_content> 
322          <#assign docs = items.getJSONObject("data").getJSONArray("items")> 
323          <#list 0..docs.length()-1 as i > 
324              <#if docs.getJSONObject(i)?has_content > 
325                  <#assign doc = docs.getJSONObject(i) > 
326                  <#assign glURL = doc.getString("URL") > 
327                  <#assign glTitolo = doc.getString("Titolo") > 
328                  <li class="globolink"><a href="${glURL}">${glTitolo}</a></li> 
329              </#if> 
330          </#list> 
331      </#if> 
332      <li class="globolink u-background-grey-30"><a href="http://www.stu.comune.sirmione.bs.it/AttivitaEconomiche/Istanze?filter0=&term_node_tid_depth=${gcAmbitoID}"><span >Vedi tutti</span></a></li> 
333    </#if>   
334</#macro> 

torna all'inizio del contenuto