Re: [Hypercontent-users] Navigation
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2004-11-16 15:01:04
|
Hi Alex Thanks very much, thats solved it! and just about clears all the problems I've have setting up our new public website. I still don't seem to be able to get the html editor to allow me to create tables with cell colours, it strips them out on saving. Have you seen/overcome this before? Thanks Carl Alex Vigdor wrote: > Hi Carl, > I would try replacing the XPath in your first for-each with > > $navigation/nav-item/nav-item[starts-with(/cms:wrapper/cms:source/ > @directory,@directory)] > > I'm assuming the problem is that at lower levels, the source > directory is not equal to the nav-item directory, but is a descendant > of it. Let me know how that works. > > -Alex > > On Nov 16, 2004, at 5:21 AM, Carl Barrow wrote: > >> Hi Alex >> I seem to have everything set up correctly in the project >> definition, I think it's the xsl I'm having problems with. I've made >> it just about everything else apart from what I need to actually >> do. I can get it to display the very top level navigation >> throughout and have also made it display links to all pages on >> every page. If you have time to take a look that would be great. >> I've included the code below. >> >> Many thanks >> Carl >> >> <xsl:template name="left-navigation"> >> <xsl:for-each >> select="$navigation/nav-item/nav-item[/cms:wrapper/cms:source/ >> @directory = @directory]"> >> <xsl:for-each select="nav-item"> >> <xsl:variable name="onSelf" select="@location = >> $sourceItem/@location"/> >> <xsl:variable name="style"> >> <xsl:choose> >> <!-- this is self --> >> <xsl:when test="$onSelf"> >> <xsl:text></xsl:text> >> </xsl:when> >> <!-- normal link --> >> <xsl:otherwise> >> <xsl:text></xsl:text> >> </xsl:otherwise> >> </xsl:choose> >> </xsl:variable> >> <xsl:choose> >> <xsl:when test="$onSelf"> >> <xsl:call-template >> name="navigation-link-side"> >> <xsl:with-param name="style" >> select="$style"/> >> </xsl:call-template> >> </xsl:when> >> >> <xsl:otherwise> >> <xsl:call-template >> name="navigation-link-side"> >> <xsl:with-param name="style" >> select="$style"/> >> </xsl:call-template> >> </xsl:otherwise> >> </xsl:choose> >> </xsl:for-each> >> </xsl:for-each> >> >> Alex Vigdor wrote: >> >>> Hi Carl, >>> First off, you need to make sure you're including your site map >>> or navigation file in the output definition for the secondary >>> pages; you'll also have to make sure the logic in your xsl is going >>> to properly cause the menu to get generated at that level. When >>> you're in a subdirectory, you can't of course grab the related >>> element with an equals comparison on the directory - what we do >>> here is use the xsl starts-wth function. For example, >>> >>> <xsl:for-each select="$navigation/nav-item"> >>> <xsl:choose> >>> <xsl:when >>> test="starts-with(@directory,/cms:wrapper/cms:source/@directory"> >>> <!-- display active navigation link --> >>> </xsl:when> >>> <xsl:otherwise> >>> <!-- display inactive navigation link --> >>> </xsl:otherwise> >>> </xsl:choose> >>> </xsl:for-each> >>> >>> If you have trouble with it, send along your project definition and >>> XSL and I'll have a look. >>> >>> -Alex >>> >>> On Nov 15, 2004, at 8:38 AM, Carl Barrow wrote: >>> >>>> Hi Alex >>>> >>>> Just one more thing (for now) that I need help with...... >>>> >>>> My site here automatically creates menu items down the left which >>>> works fine at root level and then also down to the next set of >>>> directories, for example 'root/first level/ ' If I create sub >>>> directories in the first level I don't get any menu items on those >>>> pages. I need to keep the menu items for those pages the same as >>>> the ones visible in my first level directories. How can I do this? >>>> >>>> Thanks >>>> Carl >>>> >>>> -- >>>> ************************************ >>>> >>>> Carl Barrow >>>> Web Developer >>>> e-Services >>>> The University of Hull >>>> Cottingham Road >>>> Hull >>>> HU6 7RX >>>> Ext. 6838 >>>> ************************************ >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: InterSystems CACHE >>>> FREE OODBMS DOWNLOAD - A multidimensional database that combines >>>> robust object and relational technologies, making it a perfect match >>>> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >>>> _______________________________________________ >>>> Hypercontent-users mailing list >>>> Hyp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/hypercontent-users >>>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: InterSystems CACHE >>> FREE OODBMS DOWNLOAD - A multidimensional database that combines >>> robust object and relational technologies, making it a perfect match >>> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >>> _______________________________________________ >>> 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 >> ************************************ >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: InterSystems CACHE >> FREE OODBMS DOWNLOAD - A multidimensional database that combines >> robust object and relational technologies, making it a perfect match >> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 >> _______________________________________________ >> Hypercontent-users mailing list >> Hyp...@li... >> https://lists.sourceforge.net/lists/listinfo/hypercontent-users > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > _______________________________________________ > 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 ************************************ |