I really like the idea. I have been using an eto snippet called "ListChildOrSibs", but I abandoned it because it does not respect the "Show in Menu" box being unchecked. Does your snippet check a documents Show in menu status?
-sD-
-
☆ A M B ☆
- 24,524 Posts
Doesn’t look like it; the field to look for is "hidemenu". If that’s set to 1 then the item should not be shown; if it’s 0 is should be shown.
DropMenu has this:
function filterHidden($var) {
return (!$var['hidemenu']==1);
}
-
☆ A M B ☆
- 24,524 Posts
Why couldn’t you just use {!DropMenu?startDoc=`[*parent*]`!]
-
☆ A M B ☆
- 24,524 Posts
Well, and the MODx variables. Amazing what you can accomplish with a little creative use of them! Take a look at the site_content table structure, and you’ll see all the things you can use [*pagevariable*] for. And browsing the system_settings table shows all the [(variables)] for site-wide stuff that’s available. You can also access them as $modx->config[’sitewide’], as well as a few other odds and ends that get stuck in that array. I find the document parser class file fascinating reading; I learn something more that can be done every time I read through it. Also echoing the $_SESSION from time to time is quite enlightening as to what user information is readily available.
-
☆ A M B ☆
- 24,524 Posts
I’m looking forward to better support for using snippets and tvs inside of snippet code.