1<#assign journalArticleTool = serviceLocator.findService('cat.amb.framework.serv.tools.ui.JournalArticleTool')/>
2<#assign journalLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
3<#assign query = renderRequest.getAttribute("CURRENT_COMPLETE_URL") />
4
5<#if query?contains("/detall/-")>
6 <#attempt>
7 <#if query?contains("?")>
8 <#assign
9 query = query?keep_before("?")
10 />
11 </#if>
12 <#assign
13 arrayQuery = query?split("/")
14 groupId = arrayQuery[arrayQuery?size -1]
15 articleId = arrayQuery[arrayQuery?size -2]
16 contingut = journalLocalService.getArticle(groupId?number,articleId)
17 fieldMap = journalArticleTool.getFieldsValues(contingut, themeDisplay.locale, 'titol')
18 />
19 <#assign detail= fieldMap ['titol'][0] />
20 <#recover>
21 <#assign detail ="" />
22 </#attempt>
23<#else>
24 <#assign detail ="" />
25</#if>
26
27<#if entries?has_content>
28 <ol itemprop="breadcrumb" itemscope="" itemtype="https://schema.org/BreadcrumbList" class="breadcrumb">
29 <#list entries as curEntry>
30 <#if curEntry?index != 1>
31 <li class="child" itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem">
32 <#if curEntry?is_first>
33 <a itemprop="item" itemid="/home" href="${themeDisplay.getPortalURL()}/home">
34 <span itemprop="name">Inici</span>
35 </a>
36 <#elseif !curEntry?is_last>
37 <a itemprop="item" itemid="${curEntry.getURL()}" href="${curEntry.getURL()}">
38 <span itemprop="name">${curEntry.getTitle()}</span>
39 </a>
40 <#else>
41 <#if (detail?length > 0) >
42 <span itemprop="name">${detail}</span>
43 <#else>
44 <span itemprop="name">${curEntry.getTitle()}</span>
45 </#if>
46 </#if>
47 <meta itemprop="position" content="${curEntry?index + 1}">
48 </li>
49 </#if>
50 </#list>
51 </ol>
52</#if>