Basically I wanted to create a navigation menu with webpages divided into subfolders.
So I first created my content tree like this :
Content
-Website
-- Home
-- Credits
-- Links
-- Login
-Band
-- Band News
-- Biography
-- Members
-Music
-- ...
Etcetera, etcetera, I guess you get the picture.
I didn't use a root folder, because I wanted my links to be :
- \home.aspx
- \credits.aspx
- ...
If I would've used a root folder, they would have been :
- \website\home.aspx
- \band\biography.aspx
Now I want to create an XLST navigation menu with level 1 elements "Website", "Band", "Music",... and level 2 elements "Home", "Credits", "Links",... but I can't figure out a way to call my level 1 elements.
RE: stripping the level1 nodes, there is a setting in the web.config to do so. Umbraco generates urls for both the level 1 and level 2 nodes as if they are at the same level. Be careful though, as duplicate level 2 nodes across all trees will result in the first match being shown -- IE website/news and band/news would have the same url of /news.aspx - website/news would show.
Content Tree w. subfolders
Basically I wanted to create a navigation menu with webpages divided into subfolders.
So I first created my content tree like this :
Content
-Website
-- Home
-- Credits
-- Links
-- Login
-Band
-- Band News
-- Biography
-- Members
-Music
-- ...
Etcetera, etcetera, I guess you get the picture.
I didn't use a root folder, because I wanted my links to be :
- \home.aspx
- \credits.aspx
- ...
If I would've used a root folder, they would have been :
- \website\home.aspx
- \band\biography.aspx
Now I want to create an XLST navigation menu with level 1 elements "Website", "Band", "Music",... and level 2 elements "Home", "Credits", "Links",... but I can't figure out a way to call my level 1 elements.
If I use
Forgot to mention this :
I wouldn't mind using a root folder, if someone could show me how I could strip the subfolder name from the URL.
E.g. my content tree :
Content
-Root
-- Website
--- Home
--- Links
-- Band
--- Band News
...
should result in :
- {domain}/home.aspx
- {domain}/links.aspx
- {domain}/band-news.aspx
- ...
instead of :
- {domain}/website/home.aspx
- {domain}/website/links.aspx
- {domain}/band/band-newsaspx
node[@level=0] does not exist.. it is root.
$currentPage/ancestor::root/node
RE: stripping the level1 nodes, there is a setting in the web.config to do so. Umbraco generates urls for both the level 1 and level 2 nodes as if they are at the same level. Be careful though, as duplicate level 2 nodes across all trees will result in the first match being shown -- IE website/news and band/news would have the same url of /news.aspx - website/news would show.
Great! The "ancestor::root"-method works perfectly!
Many thanks...
I also follow your post because i also search same thing that your are making thanks for this.
is working on a reply...