Copied to clipboard

Flag this post as spam?

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


  • Aaron 2 posts 22 karma points
    Nov 22, 2011 @ 08:18
    Aaron
    0

    adding title="" to top navigation

    Hi All,

    this is my first Umbraco site so please bear with me.

     

    I have an xslt which loops through content pages using the following.

          <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
      <li>
         <xsl:if test="@id = $currentPage/@id">
            <xsl:attribute name="class">current</xsl:attribute>
          </xsl:if>
        <class="navigation" href="{umbraco.library:NiceUrl(@id)}" >
         <span><xsl:value-of select="@nodeName"/></span>
        </a>
       
      </li>
     
    </xsl:for-each>

     

    Now the problem is that with in the outputted html I would like to add a title="" within the <a> link.

     

    I have created a property within the doctype with an alias of aHrefTitle. The problem is i dont know how to add this into my loop so that if this property field is populated it displays within the <a> link.

     

    Any assistance very much appriciated.

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Nov 22, 2011 @ 08:25
    Jan Skovgaard
    1

    Hi Aaron

    Welcome to the forum! :)

    In order to fetch the data from the aHrefTitle property you simply just need to add the title attribute and assign it's value to it.

    Like this <a href="{umbraco.library:NiceUrl(@id)}" class="navigation" title="{aHrefTitle}"></a>

    So simply just add the title attribute like shown to the above code :)

    /Jan

  • Aaron 2 posts 22 karma points
    Nov 22, 2011 @ 08:33
    Aaron
    0

    I'm such a dumb ass some times!

     

    Thanks Jan.

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Nov 22, 2011 @ 08:56
    Jan Skovgaard
    0

    Hey Aaron

    It's ok to be a n00b - we've all been there :-)

    If you run into something that troubles you another time don't spend too much time to figure it out if you don't have a clue on how to solve it - simply just head straight to our and ask. The response time is blazingly fast and people are smart and friendly!

    /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