Title of github issue
"nsort sorts namespaces and pages together #111"
https://github.com/samuelet/indexmenu/pull/111
"When nsort sorting option is switched on, namespaces and pages on the same index level are sorted together.
I use it with msort option as well.
Original behaviour sorted namespaces first and then sorted pages were added.
Maybe new sorting option can be added for this mode."
Additionally see this post
https://www.dokuwiki.org/plugin:indexmenu:discussion
"Further sorting problem - how to sort namespaces?
Is there any way to customise the sorting of namespaces? I have a wiki with only namespaces at the top level and I want to sort them in a custom order rather than alphabetical. Is there any way of doing this?
When you apply the sorting options, these firstly apply to pages. When you add nsort these sorting will be applied to the namespaces too."
- NOT TRUE in my experience
Also see this link
https://www.dokuwiki.org/plugin:indexmenu:discussion
Software User Manual
|
|- 1.0 Installation
|- 2.0 Configuration
| |-2.1 Global Configuration
| |-2.2 User Configuration
| |-2.3 Exporting/Importing Configurations
|-3.0 Uninstalling
Above is the logical order of how it should be, however indexmenu always moves 2.0 Configuration to the top as it is a namespace. So we too would really like to have this feature. Is there anyway we could be of use? —Kulendra 'KJ' Janaka 2011/04/05 12:00
I second this request. Kulendra's use case closely mirrors mine. Sometimes a chapter in a document should be a single page, and sometimes it's helpful to break it up into multiple subpages. – Chris Sutton 2012/08/02
Completely. It would be very useful for me as well. It is needed when the index is used as, well, an index, as in a book index, where some of the items have further subdivisions and others don't, regardless of their importance.
There's a workaround, although you'll have an empty folder working as a page:
- Create a headpage (say 'foo'). That would be the page you're trying to relocate.
- On the same level, create a namespace with the same name ('foo') and a dummy page inside it (say 'empty'). That folder will work as a the 'foo' page (which will show when you click on it), and will be otherwise empty in appearance.
At the config page:
- Tick plugin»indexmenu»hide_headpage. Now the 'foo' page won't show, but it will be displayed when you click on the 'foo' folder.
- Add the name of the dummy page at the config page on plugin»indexmenu»skip_file (something like this: /empty$/). Now you have an empty folder which you can order using msort or others.
- If you have more instances of pages you want to re-order, use the same name for all dummy pages, and they won't show in the index. – Juan Mejias 2013/03/05
https://github.com/samuelet/indexmenu/issues/66
Option to disable namespace grouping #66
Now with "nsort" option namespaces are grouped together and displayed before pages. Please add option to disable this grouping in order to show namespaces among pages.
The grouping you mentioned is independent of the "nsort" option.
"nsort" means that same sorting logic that is applied to the folders, is also applied to the folders.
So far i know, i don't know how i can sort the namespace among the pages...so at least this is a long term issue...
The sorted pages are collected per namespace and added directly to results array. When you like to sort namespaces between pages, there is a sorting mechanism required that can:
sort this result array by recognizing levels, and move the subpages as well!
or add subpages after first sorting namespaces and pages. This means that the subpages of the namespaces need to be merged in between these sorted higher level entries.... or that subpages of each namespace is first separately buffered.
Is there any chance that this PR gets merged in the official master?
These are the changes needed: https://github.com/samuelet/indexmenu/pull/111/files
Here is the "Sidebar" page coding on OpenCPN Dokuwiki used for directing IndexMenu how to sort:
{{indexmenu>:opencpn#1|js#drktheme navbar msort nsort}}
I have tried eliminating msort but that is not right. How do I get this to interleave Namespaces and Pages in the sort order?
What happens for OpenCPN Dokuwiki, is the Namespaces are sorted first, then the pages are sorted and added.
http://tgp-architects.com/dokuwiki/doku.php?id=opencpn:opencpn_user_manual
What I want is for the Namespaces and Pages to be interleaved like a "BOOK" as defined by the indexmenu sort number.
For example for "Advanced Features" sorting code at the top {{indexmenu_n>13}}
However "Advanced Features" is actually fifth in the index! NOT at all what I wnat.
See what I mean here on the OpenCPN User Manual (BOOK/ NameSpace) :
http://tgp-architects.com/dokuwiki/doku.php?id=opencpn:opencpn_user_manual
I want the Namespace "Advanced Features" to be 13th in the sorted index!!!!
Also I would like to get "Charts" located in the 10th place in the sorted index!!!
http://tgp-architects.com/dokuwiki/doku.php?id=opencpn:opencpn_user_manual:charts
I have tried everything I know to get this working properly in proper BOOK fashion. Can indexmenu do the job?