samuelet / indexmenu

A dokuwiki plugin to show a customizable and sortable index for a namespace.
http://dokuwiki.org/plugin:indexmenu
GNU General Public License v2.0
45 stars 43 forks source link

Sorting fails with subpage #202

Closed distahl closed 10 months ago

distahl commented 5 years ago

Hi,

I'm not sure if I do something wrong, but this is my issue. I'm having a list like this:

MainTitle
  1. Page1
  2. Page2
  3. Page3
  4. Page4

This working like inteded. But if I add a subpage to one of those, the sorting fails:

MainTitle
  3. Page3
    Subpage3
  1. Page1
  2. Page2
  4. Page4

The list is created with this line: {{indexmenu>:SomeTitle:MainTitle#2|tsort}}

Is this a bug or am I doing something wrong?

Klap-in commented 4 years ago

Could you maybe try: {{indexmenu>:SomeTitle:MainTitle#2|nsort tsort}} Does this improve your situation? nsort sorts the namespaces with the same sorting.

distahl commented 4 years ago

No, unfortunately isn't changing anything.

Klap-in commented 10 months ago

You see this: image (however, this is shown using useheading=never setting, but with tsort option)

What happens is that first the namespaces are are sorted, next the pages from that namespace (in this case from namespace SomeTitle:maintitle).

A aspect which makes this behaviour less clear is that nodes of a namespace will get a link to the page that is recognized as "headpage" according to the enabled headpage setting (options :same:, :inside:, :start: or custom).

Sorting of namespace together with the pages is requested in #66 as well.

Klap-in commented 10 months ago

Duplicate of #66