Edgewall Software
Modify

Ticket #7124 (new enhancement)

Opened 2 years ago

Last modified 5 weeks ago

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

trac-0.11b-wiki-macros.diff Download (1.5 KB) - added by TJ <support@…> 2 years ago.
TitleIndex optionally ignores built-in pages
trac-0.11.2-wiki-macros.patch Download (1.4 KB) - added by marek.lukacs@… 18 months ago.
Omit pages equals to or starting with world listed in colon separated list

Change History

Changed 2 years ago by TJ <support@…>

TitleIndex optionally ignores built-in pages

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:4 Changed 19 months ago by anonymous

  • Keywords newhelp added

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@…

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/*/*)]]
    

comment:8 Changed 11 months ago by Ryan Ollos <ryano@…>

  • Cc ryano@… added

comment:9 Changed 9 months ago by rblank

  • Owner changed from cboos to rblank
  • Milestone changed from 0.12 to next-minor-0.12.x

Nice ideas. I'll implement them, but after 0.12.

comment:10 Changed 5 months ago by rblank

  • Keywords bitesized added

comment:11 Changed 5 weeks ago by cboos

  • Milestone changed from next-minor-0.12.x to next-major-0.1X
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from rblank. Next status will be 'new'
The owner will be changed from rblank to anonymous. Next status will be 'assigned'
Author


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

 
Note: See TracTickets for help on using tickets.