Ticket #7124 (new enhancement)
TitleIndex (optionally) does not show pages shipped with Trac
| Reported by: | TJ <support@…> | Owned by: | rblank |
|---|---|---|---|
| Priority: | normal | Milestone: | next-major-0.1X |
| Component: | wiki system | Version: | 0.11b2 |
| Severity: | normal | Keywords: | consider newhelp bitesized |
| Cc: | ryano@… |
Description
I wanted to have TitleIndex on the front page of my Trac but didn't want the clutter of listing all the pages that are shipped with it.
I've created a patch for class TitleIndexMacro to achieve my aims. There's an additional parameter ignore. When set to 1 TitleIndex will not list the built-in pages. E.g.
[[TitleIndex(format=group,ignore=1)]]
If ignore=0 or is omitted then it lists all pages.
Attachments
Change History
Changed 2 years ago by TJ <support@…>
-
attachment
trac-0.11b-wiki-macros.diff
added
comment:1 Changed 2 years ago by cboos
- Keywords consider added
- Milestone changed from 0.11 to 0.11.1
Well, that's an useful feature, but I don't think your current implementation is suitable (e.g. ignoring all 'Inter*' files). A better approach would be to explicitly ignore all pages in the list of known help pages.
But have a look at TracDev/Proposals/NewHelp branch. I think this won't even be necessary once we switch to this.
comment:2 Changed 2 years ago by osimons
- Owner changed from cboos to osimons
- Milestone changed from 0.11.2 to 0.12
'Cluttering' of the wiki by help pages is a major reason for NewHelp. Moving this to 0.12 - currently the target for this branch.
comment:3 Changed 2 years ago by osimons
- Milestone changed from 0.13 to 0.12
Hmm. Batch update of milestones? Moving back to 0.12.
comment:5 Changed 19 months ago by anonymous
- Summary changed from Improved TitleIndex macro: optionally ignores pages shipped with Trac to TitleIndex (optionally) does not show pages shipped with Trac
Changed 18 months ago by marek.lukacs@…
-
attachment
trac-0.11.2-wiki-macros.patch
added
Omit pages equals to or starting with world listed in colon separated list
comment:6 Changed 18 months ago by marek.lukacs@…
I did it in different way. I added new options to TitleIndex macro: omit=colon:separated:list:of:words and omitstartswith=colon:separated:list:of:words.
For omitting pages shipped with trac I use:
[[TitleIndex(omit=CamelCase:PageTemplates:RecentChanges:SandBox:TitleIndex,omitstartswith=Inter:Trac:Wiki)]]
comment:7 Changed 18 months ago by cboos
- Owner changed from osimons to cboos
Hm, why not just have include/exclude fnmatch patterns?
e.g. your example:
[[TitleIndex(include=*,exclude=Inter*:Trac*:Wiki*:CamelCase:PageTemplates:RecentChanges:SandBox:TitleIndex,)]]
Other examples:
- replacing startswith (or is it prefix? I never know ;-))
[[TitleIndex(include=TracDev/*)]]
- listing only first sub-level:
[[TitleIndex(include=TracDev/*,exclude=TracDev/*/*)]]



TitleIndex optionally ignores built-in pages