Actually most of the Umbraco sites out there uses a different structure than you have got. By using one more level, most of the default XSLT templates in Umbraco works like a charm.
A structure like this:
Content - Home - About us - News - News 1 - News 2 - FAQ - Topic A - Topic B - Contact us
how to list top level nodes on top navigation menu
I'm very new to umbraco, have installed with runway, I am thinking to install CMs for each website.
In my test site I have following Content
Home
--About Us
-- Contact Us
News
--- News item1
---News Item2
Faq
---- Topic A
---How to Cook A
---How to walk
----- Topic B
---- ABC
KLM
---KLM 1
--- KLM1.1
----KLM1.2
Sorry for long post
What ever page visitor in I need Only (Home, News,Faq,KLM) on Top navigation
and then In left hand sub navigation when go to Faq see all sub pages under that .
go to KLM1 see 2 pages under that so on
in my top navigation it change everytime according to current page -
<xsl:param name="currentPage"/>
<!-- Input the documenttype you want here -->
<xsl:variable name="level" select="1"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul >
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level = $level]/* [string(umbracoNaviHide) != '1' and @isDoc]">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
How to fix when I have diffrent folders on same level of Home page
Hi Pathini
If you want to list the four top-nodes, you should change your for-each to this:
/Kim A
thanks root give me top level only
Great Pathini.
Actually most of the Umbraco sites out there uses a different structure than you have got. By using one more level, most of the default XSLT templates in Umbraco works like a charm.
A structure like this:
Content
- Home
- About us
- News
- News 1
- News 2
- FAQ
- Topic A
- Topic B
- Contact us
/Kim A
is working on a reply...