CMS, part III
OK, WordPress has a new version, so I ported one of my favorite projects The Chessmill to it. The new “pages” system looked like it was going to work. Regular readers know I’ve been using Mambo — no, this doesn’t mean I’m moving away from it. I still use it; I just don’t like depending upon only one source for my tools. I thought WordPress was possibly ready for primetime, now, so I wanted to give it a shot. I use it here, for blogging, and The Chessmill represents a hybrid site, blogging as well as historical articles, so it seemed a natural extension for WordPress.
Nope. I just supplies one more example of an approach that almost, but not quite, succeeds. You need a clue about what’s wrong? Follow the link to Chessmill and look at the mess WordPress calls a navigation structure.
When I first looked at it, I thought it would be a simple fix. But it’s deeper than that. The problem is hard-coded into the design of the code modules. Oh, I can fix it, yes. But the problem is of such a simple and obvious nature to a web designer that you really begin to despair of these CMS projects ever growing up to become useful.
The problem is there is no way to individually control the depth of display in any specific menu section. You can only set the depth of all menu items, not just one. So, while a “normal” menu structure would allow you to “drill down” through the menu, WordPress insists you display the entire menu in the same granularity.
Picture a top-level menu with 4 options, each option having four sub-options, and each option below that having 4 suboptions. Normally, if you were on page 1.2.3 of that structure, you could get all four top menu options, the four suboptions under choice 1, and the four suboptions under choice 2 in the menu, for a total of twelve options. Except WordPress by default requires you to have 84(!) options available if you want any options from the third level displayed! (All four top level options, all 16 second-level options, and all 64 third-level options.)
Yes, I said “by default.” The first and most obvious work around for this requires you to create separate templates for each level of the menu. This is, I suppose, marginally workable, requiring you to create 20 templates identical except for the navigation menus. Not that onerous, I grant you, but then think to yourself what happens when you want to restructure the navigation. Every page would have to change its template reference, plaus the template files themselves would have to change. If you’re going to do that, why do you even have a CMS? Also a new menu choice cannot be added “on the fly” but rather the multiple template files to support it will need created. Tedious.
Only slightly better is to add php code to the main template to select which navigation template you need based on where in the hierarchy you are.
So that means in order to have a rational navigation structure I have to abandon the code they used to create the navigation structure. And why? I cannot think of any meaningful circumstances under which their default behavior is desirable, much less preferable. What could have possibly come over them to provide such a silly default structure, and worse yet, make no allowances for anyone needing a real navigation structure?
There are a lot of features in WordPress I like, so don’t get me wrong; I’m not saying it’s completely trash. Just the page navigation code. (And if I read the roadmap properly, no one there even considers it a problem, which, in itself, worries me.)
I haven’t yet tried to create a third level, so my beef with the navigation in WP is a bit different. It’s a small annoying thing about categorization, really. I don’t mind so much how WP handles subcategories as how it handles entries that aren’t in a subcategory. If I have a category called “Festivals” and subcategories “Music” and “Shakespeare” under that, all the entries in the subcategories will also be displayed for “Festivals” when what I intuitively expect is that the “Festivals” category will hold all those events that don’t fall into the subcategories of “Music” and “Shakespeare”. As it is, if someone wants to see events other than music or Shakespeare, then they have to wade through ALL the entries in “Festivals”. Assuming you create subcategories for those things that you know you will have a multiple (maybe quite a lot) entries of, that means that the miscelleanous entries that aren’t assigned to a subcategory will get lost in the shuffle. It’s much less likely that the casual surfer will find them because every entry in every subcategory is pulled up when they click the main category. 🙁
Of course, the way around this is to upgrade those subcategories to categories and create catch-all categories like “Misc Festivals” and “Misc Books”, etc. Which makes the whole category-subcategory structure completely pointless.
In WPs defence I will say that the nav menu with its categories and subcategories have no doubt brought some semblance of order to thousands of personal sites that would have been aggravatingly disorganized otherwise. 😉