-
1. Re: How to implement BreadCrumb
psevestre Nov 13, 2008 11:13 AM (in response to sanupraatiy)I did it creating a custom tabs.jsp which gets injected into your pages when you use the "navigation" region in your layout.
Beginning with the current node, a while loop goes back to the root PortalNode, adding all intermediate nodes into a list.
After that I reverse the list and use it to build a "You´re here" list of links. -
2. Re: How to implement BreadCrumb
lentinig Jan 8, 2009 3:01 PM (in response to sanupraatiy)I have created a custom tabs.jsp for my application but i don't know how i get the current node from the PortalNode or other. I use jboss portal 2.7. Can you help me please?
Thanks a lot -
3. Re: How to implement BreadCrumb
bobbuilder Aug 27, 2009 4:30 AM (in response to sanupraatiy)"lentinig" wrote:
I have created a custom tabs.jsp for my application but i don't know how i get the current node from the PortalNode or other. I use jboss portal 2.7. Can you help me please?
Thanks a lot
As i have the same problem i would like to know the same... -
4. Re: How to implement BreadCrumb
tomhombergs Aug 28, 2009 4:30 AM (in response to sanupraatiy)I have implemented breadcrumbs as a separate Portlet to be included in the content area of my layout.
The portlet merely iterates from the current PortalNode up to the PortalNode representing the portal itself and outputs the links.
Simplified, you could do the following in your BreadCrumbPortlet's doView-Method (untested):PortalNode pageNode = Navigation.getCurrentNode().getParent(); while (pageNode.getType() != PortalNode.TYPE_PORTAL) { String pageUrl = pageNode.createURL(Navigation.getPortalRuntimeContext()).toString()); response.getWriter().println("<a href="+pageUrl+">"+pageNode.getDisplayName(request.getLocale())+"</a>"); pageNode = pageNode.getParent(); }
I implemented it using JSF, however.