I have two separate menus on a site I’m working on. One shows all main menu options, or sections of the site. I also have a menu that displays all submenu options, or pages, for the current section. Some sections will have no subpages, some will have subpages and a main page for the section, and some will have subpages with no main page.
I’m looking for some input on the best way to redirect certain sections (main menu items) to the first submenu item (page) if I have no main page for the section. I don’t have a problem with putting the redirect code in the content of the section’s document ("main page" for the section).
If that’s not clear as to what I mean, I’ll try to be more specific. Thanks!
I'm learning more about MODx all the time and loving it.
-
☆ A M B ☆
- 24,524 Posts
That sounds like you need the FirstChildRedirect snippet.
http://modxcms.com/extras.html?view=package/view&package=151
Wow, now I feel like an idiot. The snippet is even included by default with MODx. Thanks for the tip! Next time I should look to see what I already have first.
I'm learning more about MODx all the time and loving it.
Also check the the use of rel="category" and &categoryFoldersTpl
as descibed here:
http://www.muddydogpaws.com/development/wayfinder/parameters.html
if you want a item behave as a "main-page" for css styling etc.
I don’t think I’ll be needing that for what I’m doing, but thanks anyway.
I'm learning more about MODx all the time and loving it.
-
☆ A M B ☆
- 24,524 Posts
The snippet is even included by default with MODx
Yeah, I thought it was, but I was too lazy to go open up my local manager and look.