[Hypercontent-users] Breadcrumbs revisited
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2005-01-20 12:20:18
|
Alex/Adam I need to add breadcrumbs to my sites, I'm having a few problems formating a link from a nav-item and making it work. I know you've used it in your sites there, do you have any pointers? You sent over the template code below which works fine, it's just the nav-link. <xsl:template name="breadcrumb"> <!-- by default, grab the topmost nav-item which is an ancestor of the nav-item corresponding to the current page --> <xsl:param name="item" select="$navigation/nav-item[//nav-item[@location=$sourceLoc]]"/> <!-- presumes a template which formats a link from a nav-item --> <xsl:call-template name="navigation-link-bread"> <xsl:with-param name="item" select="$item"/> </xsl:call-template> <xsl:if test="not($item/@location=$sourceLoc)"> <!-- if we haven't reached the source nav-item yet, recurse --> <xsl:text> > </xsl:text> <xsl:call-template name="breadcrumb"> <!--grab the next ancestor nav-item --> <xsl:with-param name="item" select="$item/nav-item[//nav-item[@location=$sourceLoc]]"/> </xsl:call-template> </xsl:if> </xsl:template> Thank very much Carl -- ************************************ Carl Barrow Web Developer e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ |