Quote from: steveua at Mar 30, 2006, 05:13 PM
Yes, that was very helpful and clever, Scotty, However, I do hope that Modx (or someone) builds this functionality into the dropmenu snippet - that is, the ability to selectively show child levels of the current document.
Steve
The output generated by MODx’s DropMenu is a semantically perfect XHTML list. Most pages on the web contain a menu of links in a navigation area. These are often marked up as a string of links, often in separate DIVs or paragraphs. Structurally, however, they are a list of links, and should be marked up as such. MODx is unique and progressive in that it is first and formost a CMS and PHM Application Framework that is capeable of outputting 100% XHTML 1.1 validating pages. Search around a bit and you will find less than a handful of others that can do this.
The beauty of MODx and it’s powerful XHTML generation is that there can be complete separation of content and style. View my site without the CSS! You will notice that it is very simply organized, and in the form of an outline using <h1>-<h6>tags as significance delineators, not as a way to adjust text size.
Having a list or part of it’s items hidden or visible falls under the realm of style. MODx does not do style. XHTML in general should not do style! This is the job of CSS! That is why DropMenu is perfect. The fact that it does not selectively show and hide items is not a limitation of MODx, it is a limitation of the designer. Lists are the language of XHTML, Showing and Hiding are the language of CSS. MODx is helping to move forward to the new age of the internet. With this must also come a new way of thinking. The way you are used to designing sites and managing site menus will change, and as you become more aware of this, you begin to realize how much better it is to do it this way, and how much more flexible it makes your design.
For most designers, CSS is learning another language. It takes time to master. Just because you don’t know how it works or how to do it doesn’t mean DropMenu is broken, incomplete, or in need of improvement. It means you need to get yourself up to speed on contemporary web design. I reccomend the website
A List Apart for learning more about XHTML lists and CSS.
DropMenu is the
perfect menu system for the XHTML world. DropMenu creates everything you need to make your complete site menu. CSS does everything you need to display that list any way you can imagine, and this tutorial shows you step by step how to do this! To build the functionality you describe into DropMenu would be to antiquate the snippet and set MODx several eons back in CMS evolution, because it takes functionality away people unable to use modern browsers, and that would be wrong.
If you are unable to grasp CSS and XHTML, that’s ok. MODx and it’s developers have never claimed that this is the be all, end all in CMS applications. There are a lot of CMS’s out there [
http://opensourcecms.com ] that have exactly what you are describing in their menuing system, but they probably will not generate the beautiful, clean, Web 2.0 code that MODx does. It all depends on what is more important to you! When you get to the point that you understand XHTML, CSS, and DropMenu, you will see that it is the coolest thing since sliced bread!
There is also an ancient snippet from the tech preview releases of MODx called "MenuBuilder". It is no longer supported, and it may or may not work, but it did do what you are describing. I assure you that DropMenu, once you figure it out, will do everything you want and more! I have attached the MenuBuilder snippet to this post.
later
-sD-
scotty Delicious