-
- 361 Posts
Thanks Dimitri. I actually tried that as well and it doesn’t change the behaviour of the snippet at all. ? Unless I’m going crazy...
No, I just checked again, it displays the exact same thing regardless of 0 or 1, ! or not. (I’m using 0.9.1 now but I had been trying this on 0.9.0 with the same results.)
-
- 361 Posts
Ok, this is odd.
Short Answer: Changing the 1 to a 0 does indeed work, but not if another non-modified DropMenu snippet is called prior to the modded snippet call.
Long Answer: One of the sites I’m working on has a main nav on the left (vertical), and a subnav across the top (horizontal). Check it out here: 209.126.144.59.
The left DropMenu is modded to display weblinks correctly (called as DropMenuTMC), the subnav is a regular DropMenu, and on the Course/Member page, I’m calling a third DropMenu (named OrgList) modded to show the "don’t show in menu" items.
Guess what: Whatever the code that is in the first DropMenu call gets called for all three dropmenus regardless the modified code that’s actually called, and regardless the names of the snippets. If I change the DropMenuTMC (leftnav) to show hidden items, all three menus show hidden. I change it back, all three menus show the non-hidden items.
Anybody want to confirm this? For the time being, I’m making the 0/1 value that I need changed as a value that’s passed to the snippet, so I can use actually use the same snippet for all three, but this seems like it could be a pretty ugly issue for anybody that needs differently modded dropmenus on the same page.
Brett, can you file this in the bugtracker so it doesn’t slip by without resolution. That’s really odd... :/
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
I think it’s time to probably isolate this into a proper class as was done on the MemberCheck snippet.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me