Further development
https://forum.dokuwiki.org/post/54286
Sort Order -Fix no child pages problem
Dokuwiki sorts all the pages which have child pages before those which don't. This is solved by adding a blank child page to each page which had no child pages. Here's how to do it.
As you look at the list of pages in the sidebar those without a + prefix don't have any child pages. Right-click on the sidebar link and choose “Create/Custom page” from the pop-up menu. The new page will be created under the namespace you clicked on. When prompted for the name of the new page enter “blank”. In the new page enter “This page intentionally left blank.” Then save the page. It's not necessary to edit the parent page. You don't need a link to the blank page, you just need to have it present in the file structure.
There are some pages (or namespaces) whose child pages have no child pages of their own. They appear in the proper order in the sidebar. Should we create child pages for them anyway to preserve the sort order in case someone later adds another child page or should we wait until that happens and add the necessary blank pages to restore the sort order? If a later editor adds a child page this scheme for preserving the sort order may have been forgotten. On the other hand, many of the pages may never have a child page, making a lot of blank pages just unnecessary overhead.
Here is how IndexMenu navigational sidebar looks now:
http://tgp-architects.com/dokuwiki/doku.php?id=opencpn:opencpn_user_manual
We are now looking for a way to "hide" all the "blank" pages or get Indexmenu to skip them! -Any ideas are welcome.
By the way, there is some php code which could be incorporated into IndexMenu which would provide an option to Fix the no child page problem and improve the sort order of "namespaces" and "pages",
see this Pull Request on Github:
https://github.com/samuelet/indexmenu/pull/111/files
Also
https://github.com/samuelet/indexmenu/issues/66
Should we just make these changes on our version or wait until they are made for the plugin INDEXMENU?
When will they be incorporated in the Plugin?