1<#--
2Widget templates can be used to modify the look of a
3specific application.
4
5Please use the left panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8
9<#assign BapProductNavService = serviceLocator.findService("com.bosch.autoparts.product.nav.service.BapProductNavService")>
10
11<#assign siteUrl = themeDisplay.getScopeGroup().getFriendlyURL()>
12<#assign pageURL = themeDisplay.getLayout().getFriendlyURL()>
13<#assign pageTitle = themeDisplay.getLayout().getHTMLTitle(locale)>
14<#assign productsPageUrl = propsUtil.get("products-page-url-"+themeDisplay.getLanguageId())>
15
16<#assign countryCode = locale.getCountry()?lower_case>
17<#if countryCode == "mx">
18<#assign listAssetCategory = BapProductNavService.getNavigationCategory(themeDisplay, "product categories mx")>
19<#else>
20<#assign listAssetCategory = BapProductNavService.getNavigationCategory(themeDisplay, "product categories")>
21</#if>
22
23<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
24
25<#assign productLayout = layoutLocalService.fetchLayoutByFriendlyURL(themeDisplay.getScopeGroupId(), false, productsPageUrl)>
26<#assign productLayoutName = productLayout.getHTMLTitle(locale)>
27
28<#assign homeLayout = layoutLocalService.fetchLayoutByFriendlyURL(themeDisplay.getScopeGroupId(), false, "/home")>
29<#assign homeLayoutName = homeLayout.getHTMLTitle(locale)>
30
31<div class="container">
32 <div class="row">
33<ol class="breadcrumb bap-breadcrumb-wrapper">
34 <li class="breadcrumb-item">
35 <a class="breadcrumb-link" href="/home" title="${homeLayoutName}">
36 <span class="breadcrumb-text-truncate">${homeLayoutName}</span>
37 </a>
38 </li>
39 <li class="breadcrumb-item">
40 <#if pageURL == productsPageUrl>
41 <span class="breadcrumb-text-truncate">${productLayoutName}</span>
42 <#else>
43 <a class="breadcrumb-link" href="${productsPageUrl}" title="${productLayoutName}">
44 <span class="breadcrumb-text-truncate ">${productLayoutName}</span>
45 </a>
46 </#if>
47 </li>
48 <#list listAssetCategory as assetCategory>
49 <#if assetCategory.getParentCategoryId() == 0 && assetCategory.getName() == pageTitle >
50 <li class="breadcrumb-item">
51
52 <span class="breadcrumb-text-truncate">${htmlUtil.escape(assetCategory.getName())}</span>
53
54 </li>
55 </#if>
56 <#if assetCategory.getParentCategoryId() == 0 && !pageURL?contains("/"+assetCategory.getUrl()) >
57
58
59 <#list listAssetCategory as childAssetCategory>
60
61 <#if childAssetCategory.getParentCategoryId() == assetCategory.getCategoryId() && pageURL?contains("/"+childAssetCategory.getUrl())>
62
63 <li class="breadcrumb-item">
64 <a class="breadcrumb-link" href="${assetCategory.getUrl()!""}" title="${htmlUtil.escape(assetCategory.getName())}">
65 <span class="breadcrumb-text-truncate">${htmlUtil.escape(assetCategory.getName())}</span>
66 </a>
67 </li>
68
69 <li class="breadcrumb-item">
70
71 <span class="breadcrumb-text-truncate">${htmlUtil.escape(childAssetCategory.getName())}</span>
72
73 </li>
74 </#if>
75 </#list>
76 </#if>
77</#list>
78</ol>
79</div>
80</div>