-About
--About stuff
---This is more stuff
---I love stuff
---Another just to annoy you
--More Stuff
How would I go about modding the code?
Everything I've tried has messed up and the only way I could get it to work even close to what I want was to display the entire navigation structure in the left hand navigation.
Really simple 2nd tier navigation driving me a bit crazy...
Hey everyone :-s
I've got a very basic structure like this:
Home
-About
--About stuff
--More Stuff
-Life
--About Life
--Life Stuff
-Death
--About Death
--Death Stuff
-Love
--Love stuff
--More Love
The top level links (About, Life etc) are in the header area of the site. With their sub-pages in a left hand navigation area.
Using this code it works great :)
[code]
]>
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"
exclude-result-prefixes="msxml umbraco.library">
[/code]
BUT if a user wanted to do this:
-About
--About stuff
---This is more stuff
---I love stuff
---Another just to annoy you
--More Stuff
How would I go about modding the code?
Everything I've tried has messed up and the only way I could get it to work even close to what I want was to display the entire navigation structure in the left hand navigation.
Hope you get what I mean #-o
Hi,
I'd guess you need an extra for-each loop...
[code]
[/code]In above code, should also check whether there are still child nodes (otherwise, you'll get an empty
tag).
If you need extra levels of navigation (3rd, 4th), consider recursion)
I know of a great package which has all those features in one single package: http://packages.maliciousthinktank.com/navdemo.aspx
Cheers,
/Dirk
is working on a reply...