Yes that's simple to do. Just create a new property on your document type called 'Menu title' and in your Razor/XSLT macro use that property rather than the nodeName property. This will effectively de-couple the node name from the navigation text.
but really grateful if u explan me the syntax (how to use property name), this is my Razor script which i have used in master tamplete. and created property with name "Menu Title"
Great - glad it worked. I must admit I haven't done much razor, but I'd suspect it was something like replacing @page.Name with @page.MenuTitle, right?
Instead of doing that much amount of code
Insert a field in your Document Type with Name "URL Name" (Text String) with Alias name "UmbracoUrlName" and then in your Content enter any name of your wish which would be your URL name
making navigation menu name diff. from page name
Hi all,
Can it be Possible to make Menu Title name differant from actual pagename
Eg: In Top Navigation menu apperes "Home" and actual page name is default.aspx
plz guide!!
Hi Deepali,
Yes that's simple to do. Just create a new property on your document type called 'Menu title' and in your Razor/XSLT macro use that property rather than the nodeName property. This will effectively de-couple the node name from the navigation text.
Thanks for help
i get your logic,
but really grateful if u explan me the syntax (how to use property name), this is my Razor script which i have used in master tamplete. and created property with name "Menu Title"
Thanks in advance. :)
Hey i have done it : )
Thanks alot..
Great - glad it worked. I must admit I haven't done much razor, but I'd suspect it was something like replacing @page.Name with @page.MenuTitle, right?
Absolutely this.. with alias
Hi Dan or anyone else
How would I do the same thing but with an XSLT? I have this at the moment, but it's not doing any thing Thanks for your help in advance
Natasha
<?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" xmlns:Examine="urn:Examine" xmlns:umbraco.contour="urn:umbraco.contour"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Examine umbraco.contour ">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage"/>
<!-- Don't change this, but add a 'contentPicker' element to -->
<!-- your macro with an alias named 'source' -->
<xsl:variable name="source" select="/macro/source"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul class="send_top_nav">
<li><a href="1198">Home</a></li>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
<li>
<xsl:choose>
<xsl:when test="$currentPage/pageNameMenu != ''">
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="$currentPage/pageNameMenu"/>
</a>
</xsl:when>
<xsl:otherwise>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:for-each>
<li><a href="/home.aspx">ABA Home</a></li>
</ul>
</xsl:template>
</xsl:stylesheet>
Instead of doing that much amount of code Insert a field in your Document Type with Name "URL Name" (Text String) with Alias name "UmbracoUrlName" and then in your Content enter any name of your wish which would be your URL name
Cheers Sagar----
is working on a reply...