#2423 closed enhancement (wontfix)
Decrease headline level for included pages
Reported by: | Owned by: | Noah Kantrowitz | |
---|---|---|---|
Priority: | normal | Component: | IncludeMacro |
Severity: | normal | Keywords: | headline smart hierarchy |
Cc: | lei@… | Trac Release: | 0.11 |
Description
First I would like to say, that I love this macro as I can now use meta wiki pages constructing a kind of "book" of selected content in my wiki.
There are only two things I am missing:
- Incomplete TOC as already described in Ticket #2306
- Decreasing the level of all headlines in included wiki pages
Example: MainArticle goes like
= User Guide = [[Include(wiki:Installation, text/x-trac-wiki)]] .. more Include follow here ..
and Installation contains:
= Prerequisites = In order to install .. bla == Database == bla bla
The the resulting should be
= User Guide = == Prerequisites == In order to install .. bla === Database === bla bla
For best result, a decrease level counter should be passed down on each include. That would allow this feature to work properly even when an included page itself includes other pages (wich itself might again include other pages, ..). Of course a headline can not be below level 7 as this would break the HTML standards. I have no idea how to handle this in a smart way..
Thank you for your attention so far!
Attachments (2)
Change History (5)
comment:1 Changed 17 years ago by
Cc: | lei@… added; anonymous removed |
---|---|
Keywords: | hierarchy added |
Trac Release: | 0.10 → 0.11 |
Changed 17 years ago by
Attachment: | macros.diff added |
---|
Headlines hierachy PATCH - I accidently added the macros.py file before
comment:2 Changed 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Because this macro uses the already modular mimeview API, I would recommend making this into a formatter of some form, so you can package it independently. As this is not generalized, it won't be included in the macro directly.
comment:3 Changed 17 years ago by
Hi Coderanger, I am a newbee in python and Trac plugin programming. Thats why I don't get you :) However, it works for me and I am glad if somebody could use it, too.
PS: Just wanted to add something on the use. The new parameter order is as follows:
[[Include(<WikiPage>,<HeadlineLevelDecrease>,<Format>)]]
HeadlineLevelDecrease defaults to 1. Examples:
[[Include(CamelCase)]] [[Include(CamelCase,1)]]
I created a patch for the decreasing of headlines, which is attached. The patch is based on [3615] of the IncludeMacro and works with Trac 0.11.
Feel free to provide feedback.