Hey I have created a drop down menu with the help of xslt and have used spry menu bar horizontal for that. But in that i dont want the parent node i.e. the first node to be clickable.I want to remove the link from that. So please can you tell me how can we achieve this.
I think u r directly applying link in my opinion first u have to check the node name then apply url to anchor tag.if it is services apply # to anchor tag.
if u want i can give idea using using user control.
This is assuming the node-name of the Services page is "Services". This will render any node with nodeName = "Services" as a "dead" link, if you want the link to be completely absent, just remove the "a"-tag
Remove Link-XSLT Help
Hey I have created a drop down menu with the help of xslt and have used spry menu bar horizontal for that. But in that i dont want the parent node i.e. the first node to be clickable.I want to remove the link from that. So please can you tell me how can we achieve this.
Thanks
Akruti.
it would be great if you'd show us your site structure and current xslt snippet.
looking forward to your info.
Cheers,
/Dirk
Hey this is the link to my website. http://66.132.221.236:82/1047.aspx?umbVersion=f864a1cf-621e-4c0b-90c3-628fd418b37f
Here i dont want the Services link to be clickable. About us and events can be clicked.
My xslt code is pasted here:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<!-- update this variable on how deep your site map should be -->
<xsl:variable name="maxLevelForSitemap" select="4"/>
<xsl:template match="/">
<div id="mainnav">
<xsl:call-template name="drawNodes">
<xsl:with-param name="parent" select="$currentPage/ancestor-or-self::node [@level=1]"/>
</xsl:call-template>
</div>
</xsl:template>
<xsl:template name="drawNodes">
<xsl:param name="parent"/>
<xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)">
<ul id="MenuBar1" class="MenuBarHorizontal">
<xsl:for-each select="$parent/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]">
<li>
<a class="MenuBarItemSubMenu" href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
<xsl:if test="count(./node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $maxLevelForSitemap]) > 0">
<xsl:call-template name="drawNodes">
<xsl:with-param name="parent" select="."/>
</xsl:call-template>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Please revert as soon as possible. Thank you.
Hey please help to solve this issue.
hi Akruti,
I think u r directly applying link in my opinion first u have to check the node name then apply url to anchor tag.if it is services apply # to anchor tag.
if u want i can give idea using using user control.
hope this helps,
---vijay.
Your site appears to be down - so i can't check what the output should be, but one way of solving this could be to do something like this:
This is assuming the node-name of the Services page is "Services". This will render any node with nodeName = "Services" as a "dead" link, if you want the link to be completely absent, just remove the "a"-tag
Regards
Jesper Hauge
is working on a reply...