Opened 9 years ago

Closed 9 years ago

# Grouping of entries

Reported by: Owned by: izzy Shun-ichi Goto normal TracWikiNegotiatorPlugin normal 0.10

### Description

In 0.11, there were options added to the [[TitleIndex]] macro, such as [[TitleIndex(format=group,min=4)]] to group pages with the same prefix if there are at least 4 entries with the same prefix (e.g. all Wiki* pages are grouped this way). I would love to see that in MultiLangTitleIndex as well - since it significantly improves navigation in long lists.

This should not just break at CamelCase indicators, but hierarchical divisors (such as "/" or ":") should also be considered.

### comment:1 Changed 9 years ago by izzy

Type: defect → enhancement

I don't want to offend - but do you accept this RFE? Especially with a wiki grown quite large, this would help a lot to improve orientation in the index.

### comment:2 Changed 9 years ago by Shun-ichi Goto

Resolution: → fixed new → closed

### comment:3 Changed 9 years ago by izzy

Resolution: fixed closed → reopened

Thanx for the update! Unfortunately it causes just a mess here: The System-Pages are no longer ordered alphabetically, which causes multiple groups for the same prefix to appear (see attached screenshot "mtoc-grouping"). Moreover, it seems to have trouble with hierarchical wikis (see attached screenshot "mtoc-grouping1"). Screenshots have been made at r4977.

### Changed 9 years ago by izzy

System pages not ordered alphabetically, grouping messy

### comment:4 follow-up:  7 Changed 9 years ago by izzy

Please forget the "hierarchical" problem - it was just a bit confusing. Looking at it a few minutes more, it absolutely makes sense. Still, I'll attach the screenshot - maybe there should be a switch for "how many levels deep" the grouping should go? If you refuse that, I guess it's just something to get used to.

### Changed 9 years ago by izzy

Multiple levels with hierarchical wikis may be a bit confusing

### Changed 9 years ago by izzy

Ordering system pages alphabetically again (and remove the obsolete "Bonus Wild TIPS" at the end of the file)

### comment:5 follow-up:  8 Changed 9 years ago by izzy

Luckily I figured out how to get the system pages sorted again. Feel free to use the attached patch (which also removes the probably obsolete commented TOC override, which is already enabled in the section before the comment).

### Changed 9 years ago by izzy

Just some typo fixes ;)

### comment:6 follow-up:  9 Changed 9 years ago by izzy

Another comment: system_pages have no language extension - but this does not necessarily mean they are using the "default language". Instead, they are usually in English - regardless of what the current "default language" is.

Above is at least valid for the system_pages gathered from the wiki-default directory. If a user declares other pages as system_pages, this may be different (though it usually is not). So I'd suggest, as long as there is no additional language variant for any of the system files, to ommit the "language version" here completely.

Moreover, I'd appreciate to not see "default" there, but what is configured as default. Sure, I as the admin now what is "default" - but it is not that obvious to visitors of the site. Since this is probably a subjective decision ("default" could also indicate this is probably the "original" variant), I'd suggest to make this a switch for the trac.ini file, e.g. "lang_default = default" for the current state, or "lang_default = system" to use the default_lang defined in the wiki segment of the trac.ini.

### comment:7 in reply to:  4 ; follow-up:  10 Changed 9 years ago by Shun-ichi Goto

Still, I'll attach the screenshot - maybe there should be a switch for "how many levels deep" the grouping should go? If you refuse that, I guess it's just something to get used to.

depth argument is not enough? Is it differ from differ from Trac 0.11? Because I've almost copied the code and logic from trac, I expect the behaviour is same.

### comment:8 in reply to:  5 Changed 9 years ago by Shun-ichi Goto

Luckily I figured out how to get the system pages sorted again. Feel free to use the attached patch

Thanks, applied both patches in r4979.

### comment:9 in reply to:  6 Changed 9 years ago by Shun-ichi Goto

Resolution: → fixed reopened → closed

Another comment: system_pages have no language extension - but this does not necessarily mean they are using the "default language". Instead, they are usually in English - regardless of what the current "default language" is.

Above is at least valid for the system_pages gathered from the wiki-default directory. If a user declares other pages as system_pages, this may be different (though it usually is not). So I'd suggest, as long as there is no additional language variant for any of the system files, to ommit the "language version" here completely.

Yeah, it is difficult issue because naming of the pages are not controlled. It may not be true when we use localized version of trac distribution. In fact, Japanese localized version of trac 0.10.x contains only translated wiki pages.

The 'default' means the 'non-suffixed'. And displayed in index because we should have link to non-suffixed pages. (Once I remove it, but resumed by request)

Anyway, this is another issue. Please open new ticket if to continue.

### comment:10 in reply to:  7 Changed 9 years ago by izzy

depth argument is not enough? Is it differ from differ from Trac 0.11? Because I've almost copied the code and logic from trac, I expect the behaviour is same.

What depth argument? I tried with "(format=group,min=4)" - which means: Group if at least 4 elements can be grouped together. I tried adding "min=x" with x=1 and 2, no effect.

OTOH: As you can see on one of the screenshots, you group e.g. "GraphvizExamples/InvokingCirco" like:

• Graphviz
• Examples/
• Invoking
• GraphvizExamples/InvokingCirco

Maybe it looks less confusing without the complete Path mentioned for the document? For sure it would require less space on the screen then ;)

### Modify Ticket

Change Properties