Sub-Page Nightmare
I have had quite a struggle the last couple of days to get the new page navigation menu for WP-Andreas09 to work as I wanted.
The new menu uses the WP-PagesNav plugin by Adi Sieker which seems to work very well now that I have figured out how to use it. I had to make a minor change to the plug-in code as it didn’t quite work as expected - the plug-in has an option to suppress the leading ul tag on the first level so that you can add links, such as a link to home, but it also suppressed the closing ul tag for the first level as well, meaning that the code was not valid. Still, it was only a small edit and it really is a good plug-in. Thanks to Adi.
I believe the plugin will output the whole menu to as many levels as you want although I have only tested it to 4 levels. With this many sub-pages you could quite easily add thousands of pages if you really wanted to. I hope that this will be more than enough for anybody! The neat thing is that the whole thing works dynamically so the sub-page menu only appears when sub-pages are available and outputs to a single div with each page levels output to an unordered list. As far as horizontal menus are concerned it is far better than the WordPress default.
The only thing that remains is to style the menu and get it looking something like the original. Hopefully this will be easy so bear with me for a couple of days and I hopefully will be able to set up a demo site.
This entry was posted on Tuesday, March 28th, 2006 at 11:58 pm and is filed under WordPress Themes. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.
March 29th, 2006 at 6:54 am
Hi,
the plugin looks great! But how will it work if you have a lot of sub-pages per page?
5, 10, 20, …
Could you still use it for navigation?
if yes this would be *great* if no there should be an option to disable it.
Thanks for your great work
Karl
March 29th, 2006 at 7:12 am
Hi again,
that is the way i handle currently sub-pages:
http://www.orcasoracle.org/basics/
I modified the the subpages plugin to list only sub-pages level 1;
With this kind of navigaten i can handle a very large sub-paged structure.
Greetings
Karl
March 29th, 2006 at 11:38 am
The navigation works very simlar to how it does here on my themes pages.
The only limit to the number of sub-pages on a level is the length of the page name and width of the menu. This is the case for any horizontal menu system but if you can manage to divide your sub-pages into more sub-pages then you can soon handle a lot.
I think each level would handle about 6 - 8 pages as long as the titles are not too long. If you really want a lot of pages on 1 level then maybe a vertical menu would be more suitable for you.
March 30th, 2006 at 6:08 pm
i’ve seen other examples of sub-page navs and i think the default of the code just makes them ’spill over’ into a second row.
which isn’t a bad look in itself even.
but i think your customization so far ainslie looks great! i’d like to know when a possible ‘release’ date is?! i could really do with putting this theme to use and modifying it for your viewing and reading pleasures!
March 30th, 2006 at 7:28 pm
Hopefully I will get it released in the next few days as long as I don’t have too many problems with the styling of the menu.