Modify

Opened 12 years ago

Last modified 12 years ago

#10638 new enhancement

Create "Table of Contents" based on URL

Reported by: tsari Owned by: osimons
Priority: normal Component: TocMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

The existing TOC macro (TocMacro) uses the headline (h1 to h6) to create the table of contents. This results in a very confusing toc structure, because a headline h1 on a page on the 3rd level will be displayed on the first level of the toc.

Page structure with used headlines on the page:

page1(h3)/page2(h4)/page3(h2)
         /page2(h4)/page4
                   /page4(h1)/page5(h1)

Resulting TOC from the existing macro:

            page1 h3
                page2 h4
        page3 h2
    page4 h1
    page5 h1

My planns for an improved macro are to focus the toc creation on the url. So the resulting TOC should look likes this.

    page1 h3
        page2 h4
            page3 h2
            page4 h1
                page5 h1

So what should the macro do?

  • create the toc structure based on the url structure
  • use the first headline on each page as text for the toc entry
  • allow the user to specify the depth of the toc

Thanks for your help

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by tsari

Trac Release: 0.12

comment:2 Changed 12 years ago by tsari

Owner: changed from anybody to osimons

Could you please check if my requirements are realizable?

Regards, tsari

comment:3 Changed 12 years ago by anonymous

Component: Request-a-HackTocMacro

comment:4 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain osimons.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.