HstSiteMenuItem not expanded for SiteMapItem with placeholder (Breadcrumb)

20 views
Skip to first unread message

koev

unread,
Dec 7, 2015, 4:29:25 AM12/7/15
to Hippo Community
Hi,

I have a site map item at e.g. /account/contract/_default_/address/street (_default_ is obviously the placeholder for the contract number). If I create a menu with the same structure or a link to the street, the menu items in between don't get expanded.
@see
HstSiteMenuItemImpl
-------------------
if(currentPathInfo.startsWith(hstSiteMapItemPath)) {
// check if the match was until a slash, otherwise it is not a sitemenu item we want to expand
String sub = currentPathInfo.substring(hstSiteMapItemPath.length());

if("".equals(sub) || sub.startsWith("/")) {
// not selected but expand all ancestors
this.expanded = true;
if (this.parent == null) {
// we are a root HstSiteMenuItem. Set selected to the HstSiteMenu container of this item
((HstSiteMenuImpl) this.hstSiteMenu).setExpanded();
} else {
((HstSiteMenuItemImpl) this.parent).setExpanded();
}
}
}

I am using the breadcrumb component from hippo forge and it turns out it does nt work if you have placeholders in your url.
Reply all
Reply to author
Forward
0 new messages