indexmenu
indexmenu copied to clipboard
nsort sorts namespaces and pages together
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.
Thanks for this great addition! There have been a couple of requests for this in the issues/disscussion, so users of the indexmenu will appreciate it. e.g. #66
I think this is worth an sorting option. Not every one needs always sorting the dirs and the files together. This is useful for the backward compatibility as well.
I expect that the performance will not derogate too much, but did you test this maybe with some larger data sets already?
I have not tested the performance much. Anyway some property like IsDirectory would help on items instead of searching directories array.
Is there any chance that this PR gets merged in the official master?
This would sure be a nice improvement for those working with "book" and "chapter" formats.
I still need to test this, for some different situations.
If others have time for testing, please be welcome to do and report what you test and whether the results were like your expectations.
FWIW, I applied this to my installation and it works like a charm, thank you!
What I did:
- Change to
lib/plugins/indexmenu
- Download this MR as a patch using wget by appending
.patch
to this URL:wget https://github.com/samuelet/indexmenu/pull/111.patch
- Apply it with
patch -p1 < 111.patch
Which version is your installation?
FWIW, I applied this to my installation and it works like a charm, thank you!
What I did:
* Change to `lib/plugins/indexmenu` * Download this MR as a patch using wget by appending `.patch` to this URL: `wget https://github.com/samuelet/indexmenu/pull/111.patch` * Apply it with `patch -p1 < 111.patch`
Thanks for the advice. I would like to add, that the options nsort AND tsort have to be switched on for this to work (tested with the current release 'Hogfather').
@rolfik Thanks for contributing this long time ago and your patience! I have implemented it manually due to conflicts with the changes by @eduardomozart due to conflicts.