Wordpress 3.0, dubbed Thelonius, was released earlier this month. One of it's main features is the custom menu creation facility which was long awaited by the all Wordpress fans, clients and developers alike. This brief article is a quick look at what is really in it.
Up until now, Wordpress did not have a proper mechanism of creating or managing menus. There were functions within the wordpress core that you could call up to generate a list of categories or pages, but there was nothing that would give the flexibility of a menu manager. There were limitations on the query and re-ordering criteria of the page and category lists and there was no way to add in custom links. Of course there was always an option, code it into the theme/template. Something we integrators and to a great deal the users who actually use the system hate.
Wordpress 3.0 has taken a step in the right direction by introducing a menu manager to the core Wordpress system on it's new release. It allows users to set up three types of menus; Custom Links, Pages and Categories. Users can search, select the most popular categories/pages and add them to the menu from a single page. True to WP traditions, the menu is arrangeable through a cool drag-and-drop interface which allows users to dynamically move the positions and hierarchy of the menu items with the least number of steps.
What does a menu manager really mean to the users? It means that users can ask the developers to develop themes without having to worry about being unable to change your navigation later on. Have a new link to add? Just add it. Got a new category that needs to be highlighted? Why not add it as a separate menu item? Want a drop down menu? Just try this widget! What does it mean to the developers? It means that finally we can forget about having to decide the whole navigation structure before hand, not worry about the jQuery library and supported effects and entirely forget those menu.php files we've being shipping with the templates just to support and maintain the code for a custom menu. Effectively, it's a win-win situation.
But is the system shipped with Wordpress 3.0 really as good as it is portrayed? Let's take a quick look at what's in it and what is good and what is bad.
The Good
- Single page configuration.
- Drag-and-drop and other javascript effects.
Wordpress has had a unique way of widget/extension assignment and ordering. When other CMS systems resorted to number based ordering where a user will either assign a number to the item or move them up/down using an arrow button one level at a time, Wordpress quickly introduced a fully drag-and-drop based assignment and ordering. If you want to move a widget three levels up, you just had to click on it and drag all the way to the top. When other CMS systems take you to a separate 'configuration' page to set up the extensions, Wordpress allows you to simply click on the widget to slide down the configurations and settings for the widget.
The same user-friendly UI is present in the menu manager page as well. Users can simply click on a menu item and drag it up and down to re-order it's position. Want to assign it as a sub-menu? Just drag it inside the parent menu item. Want to make it a top level menu again? Just drag it out.
- Flexibility to change the display name and the 'title' of the link.
The Bad
This is where the bullets are dropped loaded. As much as Wordpress is a paradise for the users, it is a hell for developers. After so many years, Wordpress still hasn't developed a standard MVC platform. What Joomla learned from Mambo was that if you want 3DP support for your CMS, you need to standardise how things work. What the users want is a consistent experience, what the developers want is a consistent coding standard. But let's stop ranting about what is wrong with Wordpress overall and let's see if there is anything wrong with the menu system it self. Fortunately, most of the 'bads' affect only the developers. Unfortunately, we developers have to deal with them.
- No dedicated table for menu management
Believe it or not, Wordpress team seems to believe less number of tables, better the system it is. After taking a great big step towards making the system better, they decided to re-use the existing tables they already had. As a consequence, all the menus you set up are stored in the system in the following manner:
- Menu name: The name of the entire menu that you are preparing - stored in wp_terms table.
- Type of the menu: The designation that actually something stored in wp_terms is a menu or a category name or a tag - stored in wp_term_taxonomy and cross referred
- Menu items: The individual menu items of the menu - stored in wp_posts table
- Menu configurations: whether the menu is a custom link, a category link or a page link, the actual URL, category details and page details etc. - stored in wp_post_meta table
Sounds logical? Well perhaps some one who evolved in the wp_ tablespace, yes. But for the rest of us it makes no freaking sense whatsoever. Instead of looking in one table, now we have to look across five-six tables. Of course, proponents of Wordpress are going to come up with an argument that there is probably something like get_menu_items($id), but screwing up an entire design and then coming up with an API hook to extract those isn't exactly being smart. And you know the best part about wp_post_meta table? The great thing about wp_post_meta is that it is a general purpose table consisting of three columns; post ID, meta key and meta value. See where it is going? For each of the menu items it generates eight meta keys. Is it technically wrong? Nope it isn't, it just defies common sense, that's all.
- No 'separator' menu item
Any developer who worked for any length with navigation menus know the importance of 'Separator' items. They allow you to visually sub-divide the menu and more importantly it acts as a container to various sub-menu items. Ever come across a menu with an accordion effect? Remember how you clicked on this one item and then it expanded to reveal other items? Ever thought why clicking that worked differently? Specifically why didn't it take you to another page and why did it just run some javascript function? Well that's because that item wasn't linked to anywhere, it was a separator. Thanks to Wordpress 3.0 we now have menus, but we don't have any native support to extend it's user experience. Does this mean that it will not be possible to come up with cool menu effects for Wordpress 3.0? No not at all, there are ways to circumvent the system and fool it enough. But then, why not have the full support from the system it self?
So what's the final verdict? Wordpress initially started out as a blogging platform and to a large extent, evolved as such. My take is that it hasn't moved away from it into a fully fledged CMS. But that just worries only us developers, as far as the end user is concerned, it still is a flexible, easy-to-use content management system that has a lot to offer. One of my long term clients for whom I worked as a sub-contractor made a drastic move from building Joomla based sites to building Wordpress based sites. When I asked him about why the sudden change, he gave the most simplest reason, end clients find it easier to interact with Wordpress than with Joomla. So yes, despite it's drawbacks, Wordpress is going to stand its ground, and well at least one step at a time, they are making the right move.
Comments
Hi Aaron,
Glad that it helped, hope your exercise was successful.
RSS feed for comments to this post