List of usage examples for com.liferay.portal.kernel.util PortalUtil addPortletBreadcrumbEntry
public static void addPortletBreadcrumbEntry(HttpServletRequest httpServletRequest, String title, String url, Map<String, Object> data, boolean portletBreadcrumbEntry)
From source file:com.liferay.asset.taglib.internal.util.AssetCategoryUtil.java
License:Open Source License
public static void addPortletBreadcrumbEntries(long assetCategoryId, HttpServletRequest request, PortletURL portletURL, boolean portletBreadcrumbEntry) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); AssetCategory assetCategory = AssetCategoryLocalServiceUtil.getCategory(assetCategoryId); List<AssetCategory> ancestorCategories = assetCategory.getAncestors(); Collections.reverse(ancestorCategories); for (AssetCategory ancestorCategory : ancestorCategories) { portletURL.setParameter("categoryId", String.valueOf(ancestorCategory.getCategoryId())); PortalUtil.addPortletBreadcrumbEntry(request, ancestorCategory.getTitle(themeDisplay.getLocale()), portletURL.toString(), null, portletBreadcrumbEntry); }/*from www . j av a 2 s .c o m*/ portletURL.setParameter("categoryId", String.valueOf(assetCategoryId)); PortalUtil.addPortletBreadcrumbEntry(request, assetCategory.getTitle(themeDisplay.getLocale()), portletURL.toString(), null, portletBreadcrumbEntry); }