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.
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!
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>
<a 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.
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
I'm such a dumb ass some times!
Thanks Jan.
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
is working on a reply...