Edgewall Software
Modify

Opened 17 years ago

Closed 15 years ago

Last modified 14 years ago

#4654 closed enhancement (fixed)

TitleIndex macro - use indenting to display sub-directories more neatly

Reported by: anonymous Owned by: Jan Schukat <shookie@…>
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)

hierarchical_format.diff (4.8 KB ) - added by shookie@… 15 years ago.
the format="hierarchy" parameter

Download all attachments as: .zip

Change History (13)

comment:1 by Christian Boos, 17 years ago

Keywords: titleindex added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos

You can achieve something similar by specifying format=group in the list of arguments for the TitleIndex 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.

comment:2 by Mathis, 16 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:3 by Christian Boos, 16 years ago

Milestone: 0.11.10.12

#6063 proposes an alternative implementation.

comment:4 by jsiirola@…, 15 years ago

Cc: jsiirola@… 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 Christian Boos, 15 years ago

Milestone: 0.130.12
Priority: lownormal

comment:6 by felix@…, 15 years ago

Cc: felix@… added

I would welcome this improvement very much.

comment:7 by mmitar@…, 15 years ago

Cc: mmitar@… added

Me too.

comment:8 by shookie@…, 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

by shookie@…, 15 years ago

Attachment: hierarchical_format.diff added

the format="hierarchy" parameter

comment:9 by Christian Boos, 15 years ago

Owner: changed from Christian Boos to shookie@…

I'll test this when time permits, but the patch looks good. Thanks!

comment:10 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

Patch applied in r8536, with a few re-indenting (79 chars max per line), plus minor modifications in r8537.

Thanks shookie for the patch!

comment:11 by Ryan Ollos <ryano@…>, 15 years ago

Cc: ryano@… added

comment:12 by Remy Blank, 14 years ago

Owner: changed from shookie@… to Jan Schukat <shookie@…>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jan Schukat <shookie@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jan Schukat <shookie@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.