Re: [Hypercontent-users] BreadCrumbs
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2005-05-04 09:15:08
|
Thanks very much for this Alex, It's working now. However, there seems to be a problem building my sitemap if I include a breadcrumb trail. I get the error message : There was an error attempting to preview or publish /sitemap.xml -> /sitemap.html I assume this is because I'm transforming sitemap.xml as well us using it to make the breadcrumb. Would I need to use another xml file to look after the breadcrumbs? Carl Alex Vigdor wrote: > Hi Carl, > I was able to duplicate the problem, and I was able to resolve it > by replacing the use of the "//" axis with "descendant-or-self::". > > e.g. > > <xsl:template name = "breadcrumb"> > <xsl:param name = "item" select = > "$navigation/nav-item[descendant-or-self::nav- > item[@location=$sourceLoc]]"/> > > <xsl:call-template name = "breadcrumblink"> > <xsl:with-param name = "item" select = "$item"/> > </xsl:call-template> > > <xsl:if test = "not($item/@location=$sourceLoc)"> > <xsl:text> > > > </xsl:text> > > <xsl:call-template name = "breadcrumb"> > <xsl:with-param name = "item" select = > "$item/nav-item[descendant-or-self::nav-item[@location=$sourceLoc]]"/> > </xsl:call-template> > </xsl:if> > </xsl:template> > > -Alex > > On May 3, 2005, at 4:56 AM, Carl Barrow wrote: > >> Hi Alex >> >> Attached is a screenshot from the navigation editor and then a >> screenshot from the website showing where it has gone wrong. The >> navigation xml file is detailed below: >> >> <?xml version="1.0" encoding="UTF-8"?> >> <!DOCTYPE nav-template SYSTEM >> "http://hypercontent.sourceforge.net/dtd/navigation.dtd"> >> <nav-template customLabel="Home" labelWith="custom" >> pattern="/index.xml" sortChildren="by-label"> >> <nav-template pattern="/*/index.xml" sortChildren="by-label"> >> <nav-template pattern="/*/*" sortChildren="by-label" /> >> >> <nav-template pattern="/*/*/index.xml" sortChildren="by-label"> >> <nav-template pattern="/*/*/*" sortChildren="by-label" /> >> </nav-template> >> </nav-template> >> </nav-template> >> >> Many Thanks >> Carl >> >> Alex Vigdor wrote: >> >>> Hi Carl, >>> It would be helpful to see the navigation XML (we'll often >>> create an XML output for an xml-doctype that has all the includes >>> but no transformation, to see what is feeding the transform), and >>> perhaps a screenshot demonstrating where it has gone wrong. >>> >>> Alex >>> >>> On Apr 29, 2005, at 9:31 AM, Carl Barrow wrote: >>> >>>> I'm still having a problems getting breadcrumbs working properly >>>> on my sites here in Hull. It always displays the first child at >>>> a Particular level instead of the one which corresponds to the >>>> directory you are actually in. Does anyone have time to take a >>>> look at where I might be going wrong? >>>> >>>> Many Thanks >>>> Carl >>>> >>>> <xsl:variable name = "navigation" select = >>>> "/cms:wrapper/child::*/navigation"/> >>>> <xsl:variable name = "sourceLoc" select = >>>> "/cms:wrapper/cms:source/@path"/> >>>> >>>> >>>> <xsl:template name = "breadcrumb"> >>>> <xsl:param name = "item" select = >>>> "$navigation/nav-item[//nav-item[@location=$sourceLoc]]"/> >>>> >>>> <xsl:call-template name = "breadcrumblink"> >>>> <xsl:with-param name = "item" select = "$item"/> >>>> </xsl:call-template> >>>> >>>> <xsl:if test = "not($item/@location=$sourceLoc)"> >>>> <xsl:text> >>>> > >>>> </xsl:text> >>>> >>>> <xsl:call-template name = "breadcrumb"> >>>> <xsl:with-param name = "item" select = >>>> "$item/nav-item[//nav-item[@location=$sourceLoc]]"/> >>>> </xsl:call-template> >>>> </xsl:if> >>>> </xsl:template> >>>> >>>> <xsl:template name = "breadcrumblink"> >>>> <xsl:param name = "item" select = "."/> >>>> >>>> <a><xsl:attribute name = "href"> >>>> <xsl:value-of select = "$item/@location"/> >>>> </xsl:attribute> >>>> >>>> <xsl:value-of select = "$item/@label"/></a> >>>> </xsl:template> >>>> >>>> >>>> -- >>>> ************************************ >>>> >>>> Carl Barrow >>>> Web Developer >>>> e-Services >>>> The University of Hull >>>> Cottingham Road >>>> Hull >>>> HU6 7RX >>>> Ext. 6838 >>>> ************************************ >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> SF.Net email is sponsored by: Tell us your software development >>>> plans! >>>> Take this survey and enter to win a one-year sub to SourceForge.net >>>> Plus IDC's 2005 look-ahead and a copy of this survey >>>> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix >>>> _______________________________________________ >>>> Hypercontent-users mailing list >>>> Hyp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: NEC IT Guy Games. >>> Get your fingers limbered up and give it your best shot. 4 great >>> events, 4 >>> opportunities to win big! Highest score wins.NEC IT Guy Games. Play to >>> win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 >>> _______________________________________________ >>> Hypercontent-users mailing list >>> Hyp...@li... >>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >> >> >> >> -- >> ************************************ >> >> Carl Barrow >> Web Developer >> e-Services >> The University of Hull >> Cottingham Road >> Hull >> HU6 7RX >> Ext. 6838 >> ************************************ >> >> <webpage.jpg><naveditor.jpg> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great > events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 > _______________________________________________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users -- ************************************ Carl Barrow Web Developer e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ |