WordPress as CMS – Section Management

By Sol in Lab

I just finished adding the ability select where a new section will be inserted by choosing the section you want the new section to appear after.
This was the first time in a while that I played with pushing PHP-generated data to javascript, so it was a good exercise.

Here’s a shot of it:

Add new section menu

Add new section menu

I find it much better than the simple “Page Order” box you get when creating pages. I always found typing in a number and hoping for the best to be somewhat ambiguous and imprecise (especially since the display order of pages is determined both by the page order value (which can be the same across several pages and the post date of the page). I’ll probably convert this little drop-down menu to be used for page creation once I finish things up with this plugin.

I’m still mulling over what the best way to store pages in the DB would be (actually, I barely thought about it today). I did, however, determine that I need to (once again) refine the rewrite rules. Currently, a user-defined extension is required for posts (.html, .php, etc.) in order to differentiate them from sections (since their are no section prefixes by default). Once I finish this wave of refinements to the rewrite rules, I think I may be able to do away with the extension entirely. This would be very nice indeed, as I thought I was going to have to create a new query variable and query interpreter to accomplish the same thing.