Došlo je do greške prilikom obrade templejta.
Error on line 261, column 13 in 10154#10194#CANDY-BLOG-POST-TEMPLATE
journalArticleLocalService.getLatestArticle(groupId, postId, 0) is undefined.
It cannot be assigned to post
1<#include "${templatesPath}/CANDY-WEB-CONTENT-MACROS" /> 
2<#assign groupLocalService = serviceLocator.findService('com.liferay.portal.service.GroupLocalService') /> 
3<#assign group = groupLocalService.getGroup(groupId) /> 
4 
5<#if group.isStagingGroup()> 
6  <#assign group = group.getLiveGroup() /> 
7</#if> 
8 
9<#-- Managing rollout --> 
10<#assign blogRev2018 = getterUtil.getBoolean(group.getExpandoBridge().getAttribute("candy-blog-rev-2018", false)) /> 
11 
12<#if blogRev2018> 
13 
14  <#-- Constants --> 
15  <#assign JOURNAL_ARTICLE_CLASS_NAME_ID = portalUtil.getClassNameId("com.liferay.portlet.journal.model.JournalArticle") /> 
16  <#assign JOURNAL_ARTICLE_CLASS_NAME = portalUtil.getClassName(JOURNAL_ARTICLE_CLASS_NAME_ID) /> 
17  <#assign CANDY_BLOG_POST_STRUCTURE_KEY = "CANDY-BLOG-POST-STRUCTURE" /> 
18  <#assign CANDY_BLOG_PAGE_PLID = "candy-blog-page-plid" /> 
19  <#assign CANDY_BLOG_VOCABULARY = "candy-blog-vocabulary" /> 
20 
21  <#-- Services --> 
22  <#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
23  <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
24  <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
25  <#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService") /> 
26  <#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService") /> 
27  <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
28  <#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 
29  <#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") /> 
30 
31  <#-- Variables --> 
32  <#assign journalArticleId = .vars['reserved-article-id'].data /> 
33  <#attempt> 
34    <#assign journalArticle = journalArticleLocalService.getArticle(groupId, journalArticleId)/> 
35  <#recover> 
36  </#attempt> 
37  <#assign resourcePrimaryKey = journalArticleLocalService.getArticle(groupId,journalArticleId?string).getResourcePrimKey() /> 
38  <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.portlet.journal.model.JournalArticle", resourcePrimaryKey) /> 
39  <#assign categories = assetEntry.getCategories() /> 
40  <#assign segmentedSearchVocabulary = "" /> 
41  <#assign rootCategories = [] /> 
42  <#assign subCategories = [] /> 
43  <#attempt> 
44    <#assign segmentedSearchVocabulary = assetVocabularyLocalService.getGroupVocabulary(groupId ,CANDY_BLOG_VOCABULARY )> 
45    <#assign rootCategories = assetCategoryLocalService.getVocabularyRootCategories(segmentedSearchVocabulary.getPrimaryKey(),-1,-1,null) /> 
46    <#if rootCategories?has_content && validator.isNotNull(rootCategories)> 
47      <#list rootCategories as rootCategory> 
48        <#assign subCategories = subCategories + assetCategoryLocalService.getChildCategories(rootCategory.getCategoryId()) /> 
49      </#list> 
50    </#if> 
51  <#recover> 
52  </#attempt> 
53  <#assign blogPagePlid = getterUtil.getLong(group.getExpandoBridge().getAttribute(CANDY_BLOG_PAGE_PLID)) /> 
54  <#assign blogPage = ""/> 
55  <#attempt> 
56    <#assign blogPage = layoutLocalService.getLayout(blogPagePlid) /> 
57  <#recover> 
58  </#attempt> 
59 
60  <#if validator.isNotNull(request["attributes"]) &&  validator.isNotNull(request['attributes']['CURRENT_URL'])> 
61    <#assign currentURL = request['attributes']['CURRENT_URL'] /> 
62  <#else> 
63    <#assign currentURL = "#" /> 
64  </#if> 
65    <#if currentURL?contains("_redirect=") && (currentURL?split("_redirect=")?size > 0)> 
66      <#assign redirectURL = httpUtil.decodeURL(currentURL?split("_redirect=")[1]) /> 
67    <#else> 
68      <#assign redirectURL = "#" /> 
69    </#if> 
70     
71   
72 
73  <#-- Pagination variables --> 
74  <#assign blogStructure = ddmStructureLocalService.fetchStructure(groupId, JOURNAL_ARTICLE_CLASS_NAME_ID, CANDY_BLOG_POST_STRUCTURE_KEY, true) /> 
75  <#assign assetEntryQueryService = objectUtil('com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil') /> 
76  <#assign assetEntryQuery = objectUtil('com.liferay.portlet.asset.service.persistence.AssetEntryQuery') /> 
77  <#assign void = assetEntryQuery.setClassName("com.liferay.portlet.journal.model.JournalArticle") /> 
78  <#assign void = assetEntryQuery.setGroupIds([groupId]) /> 
79  <#assign void = assetEntryQuery.setClassTypeIds([blogStructure.getStructureId()]) /> 
80  <#assign void = assetEntryQuery.setOrderByCol1("publishDate") /> 
81  <#assign void = assetEntryQuery.setOrderByType1("DESC") /> 
82  <#assign postEntries = assetEntryQueryService.getEntries(assetEntryQuery) /> 
83 
84  <#assign count = 0 /> 
85  <#list postEntries as postEntry> 
86    <#if postEntry.getPrimaryKey() == assetEntry.getPrimaryKey() > 
87      <#assign curPostEntryIndex = count /> 
88    </#if> 
89    <#assign count = count + 1 /> 
90  </#list> 
91  <#assign prevPostJAUrl = "" /> 
92  <#if (curPostEntryIndex > 0)> 
93    <#assign prevPostEntry = postEntries[(curPostEntryIndex-1)] /> 
94    <#if validator.isNotNull(prevPostEntry)> 
95      <#assign renderer = prevPostEntry.getAssetRenderer() /> 
96      <#assign prevPostJA = renderer.getArticle() /> 
97      <#if validator.isNotNull(prevPostJA) && validator.isNotNull(request["attributes"]) &&  validator.isNotNull(request['attributes']['CURRENT_URL'])> 
98        <#assign prevPostJAUrl = request['attributes']['CURRENT_URL']?replace(journalArticle.getUrlTitle(), prevPostJA.getUrlTitle()) /> 
99      </#if> 
100    </#if> 
101  </#if> 
102  <#assign postEntriesSize = postEntries?size /> 
103  <#assign nextPostJAUrl = "" /> 
104  <#if (curPostEntryIndex < (postEntriesSize-1))> 
105    <#assign nextPostEntry = postEntries[(curPostEntryIndex+1)] /> 
106    <#if validator.isNotNull(nextPostEntry)> 
107      <#assign renderer = nextPostEntry.getAssetRenderer() /> 
108      <#assign nextPostJA = renderer.getArticle() /> 
109      <#if validator.isNotNull(nextPostJA) && validator.isNotNull(request["attributes"]) &&  validator.isNotNull(request['attributes']['CURRENT_URL'])> 
110        <#assign nextPostJAUrl = request['attributes']['CURRENT_URL']?replace(journalArticle.getUrlTitle(), nextPostJA.getUrlTitle()) /> 
111      </#if> 
112    </#if> 
113  </#if> 
114 
115  <#-- Related blog posts variables --> 
116  <#assign relatedPosts = {} /> 
117  <#assign subCatRelatedPosts = [] /> 
118  <#assign rootCatRelatedPosts = [] /> 
119  <#assign relPosts = {} /> 
120 
121  <#if validator.isNotNull(journalArticle)> 
122    <#assign classPK = journalArticle.getResourcePrimKey() /> 
123    <#assign jaAssetEntry = assetEntryLocalService.getEntry(JOURNAL_ARTICLE_CLASS_NAME, classPK) /> 
124    <#if validator.isNotNull(jaAssetEntry)> 
125      <#assign jaAssetEntryId = jaAssetEntry.getEntryId()> 
126 
127      <#if (jaAssetEntryId > 0)> 
128        <#assign relatedAssetEntryQuery = objectUtil('com.liferay.portlet.asset.service.persistence.AssetEntryQuery') /> 
129        <#assign void = relatedAssetEntryQuery.setClassName("com.liferay.portlet.journal.model.JournalArticle") /> 
130        <#assign void = relatedAssetEntryQuery.setGroupIds([groupId]) /> 
131        <#assign void = relatedAssetEntryQuery.setClassTypeIds([blogStructure.getStructureId()]) /> 
132        <#assign void = relatedAssetEntryQuery.setOrderByCol1("publishDate") /> 
133        <#assign void = relatedAssetEntryQuery.setOrderByType1("DESC") /> 
134        <#-- 
135        <#assign void = relatedAssetEntryQuery.setLinkedAssetEntryId(jaAssetEntryId) /> 
136        --> 
137        <#assign relatedPostsEntries = assetEntryQueryService.getEntries(relatedAssetEntryQuery) /> 
138 
139        <#assign relatedEntry = "" /> 
140 
141        <#list relatedPostsEntries as relatedEntry> 
142          <#if validator.isNotNull(relatedEntry) && relatedEntry != "" && jaAssetEntryId != relatedEntry.getEntryId()> 
143            <#assign renderer = relatedEntry.getAssetRenderer() /> 
144            <#assign relatedJA = renderer.getArticle() /> 
145 
146            <#if relatedJA.getStructureId() == CANDY_BLOG_POST_STRUCTURE_KEY> 
147              <#assign relatedPosts = relatedPosts + {relatedJA.getArticleId() : relatedEntry.getPrimaryKey()} /> 
148              <#if categories?has_content> 
149                <#assign relEntryCategories = relatedEntry.getCategories() /> 
150                <#if subCategories?has_content && validator.isNotNull(subCategories) && rootCategories?has_content && validator.isNotNull(rootCategories)> 
151                  <#list categories as cat> 
152                    <#if subCategories?seq_contains(cat) && relEntryCategories?seq_contains(cat) && !subCatRelatedPosts?seq_contains(relatedJA.getArticleId())> 
153                      <#assign subCatRelatedPosts = subCatRelatedPosts + [relatedJA.getArticleId()] /> 
154                    <#elseif rootCategories?seq_contains(cat) && relEntryCategories?seq_contains(cat) && !rootCatRelatedPosts?seq_contains(relatedJA.getArticleId())> 
155                      <#assign rootCatRelatedPosts = rootCatRelatedPosts + [relatedJA.getArticleId()] /> 
156                    </#if> 
157                  </#list> 
158                </#if> 
159              </#if> 
160            </#if> 
161          </#if> 
162        </#list> 
163      </#if> 
164    </#if> 
165  </#if> 
166 
167  <div class="blog-detail"> 
168    <div class="h1"><@liferay.language key="ask-to-candy"/></div> 
169    <#if validator.isNotNull(redirectURL)> 
170      <#if !(redirectURL?contains("categoryId="))> 
171        <#assign redirectURL = redirectURL?split("?")[0] /> 
172      </#if> 
173      <@generateLink href="${redirectURL}" class="back-blog"><@liferay.language key="back-to-blog"/></@generateLink> 
174    <#elseif validator.isNotNull(blogPage)> 
175      <@generateLink href="/${locale}${blogPage.getFriendlyURL(locale)}" class="back-blog"><@liferay.language key="back-to-blog"/></@generateLink> 
176    </#if> 
177    <div class="blog-grid"> 
178 
179      <#-- Blog post detail --> 
180      <div class="blog-column-big"> 
181        <article class="blog-main-content"> 
182          <#if onlineTitle?? && validator.isNotNull(onlineTitle.getData())> 
183            <h1>${onlineTitle.getData()}</h1> 
184          </#if> 
185 
186          <#if image1?? && alt1??> 
187            <#if validator.isNotNull(image1.getData())> 
188              <img src="${image1.getData()}" alt="<#if validator.isNotNull(alt1.getData())>${alt1.getData()}<#else>${onlineTitle.getData()}</#if>"> 
189            </#if> 
190          </#if> 
191 
192          <#if text?? && validator.isNotNull(text.getData())> 
193            <div class="content"> 
194              ${text.getData()} 
195            </div> 
196          </#if> 
197        </article> 
198 
199        <div class="blog-date"> 
200          ${assetEntry.getPublishDate()?string["dd/MM/yy"]} 
201        </div> 
202 
203        <#-- Blog Post Categories --> 
204        <@printCategories categories /> 
205 
206        <#-- Pagination --> 
207        <div class="pagination-blog"> 
208          <#if validator.isNotNull(prevPostJAUrl) && (prevPostJAUrl != "")> 
209            <@generateLink href="${prevPostJAUrl}" class="pagination-button prev"><@liferay.language key="blog-previous-article"/></@generateLink> 
210          </#if> 
211          <#if validator.isNotNull(nextPostJAUrl) && (nextPostJAUrl != "")> 
212            <@generateLink href="${nextPostJAUrl}" class="pagination-button next"><@liferay.language key="blog-next-article"/></@generateLink> 
213          </#if> 
214        </div> 
215      </div> 
216 
217      <#-- Related posts --> 
218      <#if relatedPosts?has_content && validator.isNotNull(relatedPosts)> 
219        <aside class="blog-column-small"> 
220          <h2 class="blog-correlati-title"><@liferay.language key="blog-related-posts"/></h2> 
221          <#assign postIdList = [] /> 
222 
223          <#if subCatRelatedPosts?has_content> 
224            <#assign postIdList = subCatRelatedPosts/> 
225 
226            <#if (postIdList?size < 3) && rootCatRelatedPosts?has_content> 
227              <#list rootCatRelatedPosts as postId> 
228                <#if !postIdList?seq_contains(postId)> 
229                  <#if (postIdList?size < 3) > 
230                    <#assign postIdList = postIdList + [postId] /> 
231                  <#else> 
232                    <#break> 
233                  </#if> 
234                </#if> 
235              </#list> 
236            </#if> 
237 
238 
239          <#elseif rootCatRelatedPosts?has_content> 
240            <#assign postIdList = rootCatRelatedPosts/> 
241          </#if> 
242          <#if (postIdList?size < 3) > 
243            <#list relatedPosts?keys as postId> 
244              <#if !postIdList?seq_contains(postId)> 
245                <#if (postIdList?size < 3) > 
246                  <#assign postIdList = postIdList + [postId] /> 
247                <#else> 
248                  <#break> 
249                </#if> 
250              </#if> 
251            </#list> 
252          </#if> 
253 
254          <#assign postIdIndex = 0 /> 
255          <#list postIdList as postId> 
256            <#assign postIdIndex = postIdIndex + 1 /> 
257            <#if postIdIndex gt 3> 
258              <#break> 
259            </#if> 
260 
261            <#assign post = journalArticleLocalService.getLatestArticle(groupId, postId, 0) /> 
262            <#assign relAssetEntry = assetEntryLocalService.getAssetEntry(relatedPosts[postId]) /> 
263            <#assign docXml = saxReaderUtil.read(post.getContent()) /> 
264            <#assign relOnlineTitle = docXml.valueOf("//dynamic-element[@name='onlineTitle']/dynamic-content[@language-id='${locale}']/text()") /> 
265            <#assign relImage1 = docXml.valueOf("//dynamic-element[@name='image1']/dynamic-content[@language-id='${locale}']/text()") /> 
266            <#assign relAlt1 = docXml.valueOf("//dynamic-element[@name='alt1']/dynamic-content[@language-id='${locale}']/text()") /> 
267            <#if validator.isNotNull(request["attributes"]) &&  validator.isNotNull(request['attributes']['CURRENT_URL'])> 
268             <#assign viewRelatedURL = request['attributes']['CURRENT_URL']?replace(journalArticle.getUrlTitle(), post.getUrlTitle()) /> 
269            <#else> 
270             <#assign viewRelatedURL = "#" /> 
271            </#if> 
272            <div class="editorial-dynamic"> 
273              <div class="editorial-dynamic__wrapper"> 
274                <div class="editorial-dynamic__article"> 
275                  <article class="editorial-dynamic__item"> 
276                    <#if validator.isNotNull(relImage1)> 
277                      <@generateLink href="${viewRelatedURL}"> 
278                        <div class="editorial-dynamic__slider"> 
279                          <div class="swiper-container"> 
280                            <div class="swiper-wrapper"> 
281                              <div class="swiper-slide"> 
282                                <img src="${relImage1}" alt="<#if validator.isNotNull(relAlt1)>${relAlt1}<#elseif validator.isNotNull(relOnlineTitle)>${relOnlineTitle}</#if>"> 
283                              </div> 
284                            </div> 
285                            <div class="swiper-pagination"></div> 
286                          </div> 
287                        </div> 
288                      </@generateLink> 
289                    </#if> 
290                    <div class="editorial-dynamic__text"> 
291                      <div class="editorial-text"> 
292                        <#if validator.isNotNull(relOnlineTitle)> 
293                          <@generateLink href="${viewRelatedURL}"> 
294                            <h2>${relOnlineTitle}</h2> 
295                          </@generateLink> 
296                        </#if> 
297                        <div class="blog-date">${relAssetEntry.getPublishDate()?string["dd/MM/yy"]}</div> 
298 
299                        <#assign relCategories = relAssetEntry.getCategories() /> 
300                        <@printCategories relCategories /> 
301 
302                        <@generateLink href="${viewRelatedURL}"> 
303                          <p>${relAssetEntry.getSummary(locale, true)}</p> 
304                        </@generateLink> 
305                      </div> 
306                    </div> 
307                  </article> 
308                </div> 
309              </div> 
310            </div> 
311          </#list> 
312          <#assign allRelatedsURL = "#" /> 
313          <#list categories as category> 
314            <#if subCategories?seq_contains(category)> 
315              <#if validator.isNotNull(request['render-url-normal'])> 
316                <#assign allRelatedsURL = request['render-url-normal'] + "&p_r_p_564233524_categoryId=" + category.getCategoryId() /> 
317                <#break> 
318              </#if> 
319            <#elseif rootCategories?seq_contains(category)> 
320              <#if validator.isNotNull(request['render-url-normal'])> 
321                <#assign allRelatedsURL = request['render-url-normal'] + "&p_r_p_564233524_categoryId=" + category.getCategoryId() /> 
322              </#if> 
323            </#if> 
324          </#list> 
325 
326          <@generateLink href="${allRelatedsURL}" class=""><@liferay.language key="view-all-related-posts"/></@generateLink> 
327        </aside> 
328      </#if> 
329    </div> 
330  </div> 
331 
332<#else> 
333 
334  <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
335  <#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService")> 
336  <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService")> 
337  <#assign journalArticleId = .vars['reserved-article-id'].data> 
338  <#assign resourcePrimaryKey = journalArticleLocalService.getArticle(groupId,journalArticleId?string).getResourcePrimKey()> 
339  <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.portlet.journal.model.JournalArticle", resourcePrimaryKey) > 
340  <#assign categories = assetEntry.getCategories()> 
341  <#assign SEGMENTED_SEARCH_VOCABULARY = "segmented-research-vocabulary"> 
342 
343  <div class="blog-detail"> 
344    <h1><@liferay.language key="ask-to-candy"/></h1> 
345 
346    <article> 
347      <#if image1?? && alt1?? && link1?? && image2?? && alt2?? && link2?? && image3?? && alt3?? && link3?? && image4?? && alt4?? && link4?? && image5?? && alt5?? && link5?? && image6?? && alt6?? && link6?? > 
348        <#if !validator.isNotNull(image2.getData()) && !validator.isNotNull(image3.getData()) && !validator.isNotNull(image4.getData())&& !validator.isNotNull(image5.getData()) && !validator.isNotNull(image6.getData())> 
349              <#if validator.isNotNull(image1.getData())> 
350                <#if validator.isNotNull(alt1.getData())> 
351                  <div class="slider"> 
352                    <div class="slide"> 
353                    <div class="img-wrapper"> 
354                      <@generateLink href="${link1.getData()}"><img alt="${alt1.getData()}" 
355                        src="${image1.getData()}" /></@generateLink> 
356                    </div> 
357                  </div> 
358                </div> 
359                <#else> 
360                  <div class="slider"> 
361                    <div class="slide"> 
362                    <div class="img-wrapper"> 
363                      <@generateLink href="${link1.getData()}"><img 
364                        src="${image1.getData()}" /></@generateLink> 
365                    </div> 
366                  </div> 
367                </div> 
368                </#if> 
369            </#if> 
370        <#else> 
371            <div class="main-slider"> 
372              <div class="slider"> 
373                <#if validator.isNotNull(image1.getData())> 
374                      <#if validator.isNotNull(alt1.getData())> 
375                          <div class="slide"> 
376                          <div class="img-wrapper"> 
377                            <@generateLink href="${link1.getData()}"><img alt="${alt1.getData()}" 
378                              src="${image1.getData()}" /></@generateLink> 
379                          </div> 
380                        </div> 
381                      <#else> 
382                          <div class="slide"> 
383                          <div class="img-wrapper"> 
384                            <@generateLink href="${link1.getData()}"><img 
385                              src="${image1.getData()}" /></@generateLink> 
386                          </div> 
387                        </div> 
388                      </#if> 
389                    </#if> 
390                <#if validator.isNotNull(image2.getData())> 
391                      <#if validator.isNotNull(alt2.getData())> 
392                          <div class="slide"> 
393                          <div class="img-wrapper"> 
394                            <@generateLink href="${link2.getData()}"><img alt="${alt2.getData()}" 
395                              src="${image2.getData()}" /></@generateLink> 
396                          </div> 
397                        </div> 
398                      <#else> 
399                          <div class="slide"> 
400                          <div class="img-wrapper"> 
401                            <@generateLink href="${link2.getData()}"><img 
402                              src="${image2.getData()}" /></@generateLink> 
403                          </div> 
404                        </div> 
405                      </#if> 
406                    </#if> 
407                <#if validator.isNotNull(image3.getData())> 
408                      <#if validator.isNotNull(alt3.getData())> 
409                          <div class="slide"> 
410                          <div class="img-wrapper"> 
411                            <@generateLink href="${link3.getData()}"><img alt="${alt3.getData()}" 
412                              src="${image3.getData()}" /></@generateLink> 
413                          </div> 
414                        </div> 
415                      <#else> 
416                          <div class="slide"> 
417                          <div class="img-wrapper"> 
418                            <@generateLink href="${link3.getData()}"><img 
419                              src="${image3.getData()}"/></@generateLink> 
420                          </div> 
421                        </div> 
422                      </#if> 
423                    </#if> 
424                <#if validator.isNotNull(image4.getData())> 
425                      <#if validator.isNotNull(alt4.getData())> 
426                          <div class="slide"> 
427                          <div class="img-wrapper"> 
428                            <@generateLink href="${link4.getData()}"><img alt="${alt4.getData()}" 
429                              src="${image4.getData()}" /></@generateLink> 
430                          </div> 
431                        </div> 
432                      <#else> 
433                          <div class="slide"> 
434                          <div class="img-wrapper"> 
435                            <@generateLink href="${link4.getData()}"><img 
436                              src="${image4.getData()}" /></@generateLink> 
437                          </div> 
438                        </div> 
439                      </#if> 
440                    </#if> 
441                    <#if validator.isNotNull(image5.getData())> 
442                      <#if validator.isNotNull(alt5.getData())> 
443                          <div class="slide"> 
444                          <div class="img-wrapper"> 
445                            <@generateLink href="${link5.getData()}"><img alt="${alt5.getData()}" 
446                              src="${image5.getData()}"/></@generateLink> 
447                          </div> 
448                        </div> 
449                      <#else> 
450                          <div class="slide"> 
451                          <div class="img-wrapper"> 
452                            <@generateLink href="${link5.getData()}"><img 
453                              src="${image5.getData()}" /></@generateLink> 
454                          </div> 
455                        </div> 
456                      </#if> 
457                    </#if> 
458                    <#if validator.isNotNull(image6.getData())> 
459                      <#if validator.isNotNull(alt6.getData())> 
460                          <div class="slide"> 
461                          <div class="img-wrapper"> 
462                            <@generateLink href="${link6.getData()}"><img alt="${alt6.getData()}" 
463                              src="${image6.getData()}" /></@generateLink> 
464                          </div> 
465                        </div> 
466                      <#else> 
467                          <div class="slide"> 
468                          <div class="img-wrapper"> 
469                            <@generateLink href="${link6.getData()}"><img 
470                              src="${image6.getData()}" /></@generateLink> 
471                          </div> 
472                        </div> 
473                      </#if> 
474                    </#if> 
475              </div> 
476            </div> 
477          </#if> 
478        </#if> 
479 
480        <#if onlineTitle?? && validator.isNotNull(onlineTitle.getData())> 
481          <h1>${onlineTitle.getData()}</h1> 
482          </#if> 
483 
484      <hr /> 
485 
486      <#if text?? && validator.isNotNull(text.getData())> 
487          <div class="content"> 
488              ${text.getData()} 
489          </div> 
490        </#if> 
491 
492          <div class="extra-text"> 
493        <div class="data">${assetEntry.getPublishDate()?string["dd/MM/yy"]}</div> 
494        <#if categories?has_content> 
495          <div class="categories"> 
496                    <h3 class="categories-title"><@liferay.language key="categories" /></h3> 
497            <ul> 
498              <#attempt> 
499                <#assign segmentedSearchVocabulary = assetVocabularyLocalService.getGroupVocabulary(groupId ,SEGMENTED_SEARCH_VOCABULARY )> 
500                <#assign segmentedSearchCategories = segmentedSearchVocabulary.getCategories()> 
501              <#recover> 
502                <#assign segmentedSearchVocabulary = "" > 
503              </#attempt> 
504                <#list categories as category> 
505                <#if segmentedSearchVocabulary?? && validator.isNotNull(segmentedSearchVocabulary)> 
506                    <#if !segmentedSearchCategories?seq_contains(category)> 
507                      <#if validator.isNotNull(request['render-url-normal'])> 
508                          <#assign categoryURL = request['render-url-normal'] + "&p_r_p_564233524_categoryId=" + category.getCategoryId() > 
509                    <#else> 
510                        <#assign categoryURL = "#" > 
511                    </#if> 
512                    <li><@generateLink href="${categoryURL}">${category.getTitle(locale)}</@generateLink></li> 
513                  </#if> 
514                <#else> 
515                  <#if validator.isNotNull(request['render-url-normal'])> 
516                        <#assign categoryURL = request['render-url-normal'] + "&p_r_p_564233524_categoryId=" + category.getCategoryId() > 
517                  <#else> 
518                      <#assign categoryURL = "#" > 
519                  </#if> 
520                  <li><@generateLink href="${categoryURL}">${category.getTitle(locale)}</@generateLink></li> 
521                </#if> 
522              </#list> 
523            </ul> 
524          </div> 
525        </#if> 
526      </div> 
527 
528    </article> 
529  </div> 
530 
531</#if> 
532 
533<#-- ##### --> 
534<#-- Macro --> 
535<#-- ##### --> 
536<#macro printCategories categs> 
537  <#if categs?? && categs?has_content> 
538    <div class="blog-categories"> 
539      <div class="blog-categories-title"> 
540        <@liferay.language key="categories" />: 
541      </div> 
542      <ul class="blog-categories-list"> 
543 
544        <#list categs as category> 
545          <#if segmentedSearchVocabulary?? && validator.isNotNull(segmentedSearchVocabulary)> 
546            <#if rootCategories?seq_contains(category) || subCategories?seq_contains(category)> 
547              <#if validator.isNotNull(request['render-url-normal'])> 
548                <#assign categoryURL = request['render-url-normal'] + "&p_r_p_564233524_categoryId=" + category.getCategoryId() > 
549              <#else> 
550                <#assign categoryURL = "#" > 
551              </#if> 
552              <li class="blog-categories-item"> 
553                <a href="${categoryURL}" class="blog-categories-anchor">${category.getTitle(locale)}</a> 
554              </li> 
555            </#if> 
556          <#else> 
557            <#if validator.isNotNull(request['render-url-normal'])> 
558              <#assign categoryURL = request['render-url-normal'] + "&p_r_p_564233524_categoryId=" + category.getCategoryId() > 
559            <#else> 
560              <#assign categoryURL = "#" > 
561            </#if> 
562            <li class="blog-categories-item"> 
563              <a href="${categoryURL}" class="blog-categories-anchor">${category.getTitle(locale)}</a> 
564            </li> 
565          </#if> 
566        </#list> 
567      </ul> 
568    </div> 
569  </#if> 
570</#macro>