Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alex Campbell 47 posts 69 karma points
    Nov 30, 2010 @ 00:06
    Alex Campbell
    0

    Changing root of Runway Dropdown Nav

    A little help please...

    I am building a site for a client, the site hosts various seperate sports clubs and respective sports. So we have a content structure something like this:

    Content
    - Main Holding Site
    -- Club 01
    --- Club Sport 0101
    -- Club 02
    --- Club Sport 0201
    --- Club Sport 0202

    I am trying to edit the Runway Drow Down navigation XSLT to enable me to have a different parent depending on where you are so a Club and ClubSport could have different navigations. For the sake of explaining this I have created four document types:

    Main
    Club
    ClubSport
    TextPage

    There is only one Main, Clubs can only be directly under Main, ClubSports can only be directly under Clubs, TextPages can be in any on the other three and TextPages can be within TextPages.

    I know that when $currentPage is @level=1 then we are at Main and so that is the parent.

    My problem is that when we're at anything other than @level=1 I could be (say when @level=2) on either a TextPage or Club and I can't figure out how to tell. I'm trying to go through some "whens" to test for the three or so different scenarios:

       <xsl:when test="$currentPage/@level=2">
        <xsl:call-template name="drawNodes">
                       <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@level=2 and @isDoc]"/>
        </xsl:call-template>
       </xsl:when>

    I think I need to be doing something like this:

    <xsl:when test="$currentPage/@level=2 and @$currentPage/docTypeAlias='Club'">

    and I know this must be straightforward but I just can't see it! Aaarggh!

    There's a bit more to this but if I can get this bit then I can probably figure the rest out myself (he says confidently...). Anyone have any much appreciated thoughts?

    Thanks,

    Alex

  • Kim Andersen 1447 posts 2197 karma points MVP
    Nov 30, 2010 @ 00:36
    Kim Andersen
    0

    @Admins: This is a double post. The other one.

Please Sign in or register to post replies

Write your reply to:

Draft