Copied to clipboard

Flag this post as spam?

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


  • dominik 711 posts 733 karma points
    Jan 25, 2011 @ 12:35
    dominik
    0

    mark top navigation point

    hello everybody,

    i know how to mark the active navigation point of one site.

    But how can i mark always the top navigation point of each subnavigation item.

    For example

    - Item 1
       - Item 1.1
       - Item 1.2

    If i click on Item 1.2 The main navigation point "Item 1" should be marked as "selected"

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Jan 25, 2011 @ 12:54
    Jan Skovgaard
    0

    Hi Dominik

    You should be able to achieve this by making this test:

            <xsl:attribute name="class">
              <xsl:if test="@id = $currentPage/ancestor-or-self::node/@id">
                <xsl:text>active</xsl:text>
              </xsl:if>
            </xsl:attribute>

    How does your XSLT look like for now?

    /Jan

  • dominik 711 posts 733 karma points
    Jan 25, 2011 @ 13:02
    dominik
    0

    Hi Jan,

    Your script also marks only the top if the item is the first subnavigation point.

    It does not work if I use another subnavigation point

    Regards

  • dominik 711 posts 733 karma points
    Jan 25, 2011 @ 13:05
    dominik
    1

    oh i fixed it by using

    <xsl:if test="current()/@id = $currentPage/ancestor-or-self::*/@id">

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Jan 25, 2011 @ 13:09
    Jan Skovgaard
    0

    Oops, should have been aware of posting two examples using either old or new schema.

    But you figured it out, so that's good :-)

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies