#4654 closed enhancement (fixed)
TitleIndex macro - use indenting to display sub-directories more neatly
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | titleindex |
Cc: | jsiirola@…, felix@…, mmitar@…, ryano@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The
[[TitleIndex]]
macro would look a lot nicer, and would be easier to use, if it indented sub-directories in a wiki structure.
Instead of displaying an index such as:
a
b
b/1/
b/2/
b/3/
c
It would be better to use indenting to display it in a way similar to this:
- a
- b
- 1
- 2
- 3
- c
(probably without the bullets)
Attachments (1)
Change History (13)
comment:1 by , 18 years ago
Keywords: | titleindex added |
---|---|
Milestone: | → 0.11 |
Owner: | changed from | to
comment:2 by , 17 years ago
It would be great to have an automation, to link pages and define a hierarchy.
For example: When I'm editing a page, I would like to klick on a button "Create child page".
The new page should have a Link, which is set together of the "parent link + child-name". The child page and the parent page is linked to each other.
That would be perfect to create a structure.
comment:4 by , 16 years ago
Cc: | added |
---|
There is another deficiency in the current grouping logic that the original reported hinted at but did not explicitly call out: The grouping considers the "/" character as any other character in the wiki page name. This leads to rendering the pages in an unattractive (and unintuitive) way. For example, given the following set of pages:
a b b/1/ b/2/ b/3/ c/1 c/2 c/3
The current output of [[TitleIndex(format=group,min=3)]]
produces:
This is both difficult to parse and contains extra levels that are just not necessary. It would be significantly better if it rendered it closer to:
comment:5 by , 16 years ago
Milestone: | 0.13 → 0.12 |
---|---|
Priority: | low → normal |
comment:8 by , 15 years ago
Implemented a new format parameter value "hierarchy" that renders the title index hierarchically according to wiki structure. In the process restructured the code to make addition of more format types easier. Also added a "titleindex" class attribute to the list make styling possible, which should allow to change the list-styles to whatever you like in css style sheets.
Default behavior is still the same though, as well as the "group" format option.
Regards
comment:9 by , 15 years ago
Owner: | changed from | to
---|
I'll test this when time permits, but the patch looks good. Thanks!
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:11 by , 15 years ago
Cc: | added |
---|
comment:12 by , 15 years ago
Owner: | changed from | to
---|
You can achieve something similar by specifying
format=group
in the list of arguments for theTitleIndex
macro. The only difference is that this will also create groups based on wiki words instead of levels wiki pages, so that common prefixes will be grouped together.I'll try to add an option to make this grouping strict (i.e only dependent on the wiki hierachy) or not.