Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#6074 closed enhancement (fixed)

Add way to exclude sets of pages

Reported by: Russ Brown Owned by: Martin Scharrer
Priority: normal Component: ListOfWikiPagesMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Some way to exclude ranges of pages based on some hierarchical base would be nice.

Just an idea. :)

Attachments (0)

Change History (7)

comment:1 Changed 15 years ago by Martin Scharrer

Status: newassigned

Good idea. As soon I find time.

comment:2 Changed 15 years ago by Martin Scharrer

Can be done with SQL, something like ... AND name NOT LIKE 'pattern' . I would be happy to receive patches. :-)

comment:3 Changed 15 years ago by Russ Brown

The thing that complicates this for me is that I would probably want to be able to supply multiple filters. I've had a quick look at the code but I don't know how trac macro handling of such things would work...

From the SQL perspective that would probably mean that the query builder would need to be able to handle an arbitrary number of AND name NOT LIKE 'pattern' clauses.

comment:4 Changed 15 years ago by Martin Scharrer

Resolution: fixed
Status: assignedclosed

(In [6955]) Added exclude=pattern option to ListOfWikiPages. This closes #6074.

comment:5 Changed 15 years ago by Martin Scharrer

Use as following:

Wildcards

  • * matches everything (translated to % in SQL)
  • ? matches a single character (translated to _ in SQL)

Care is taken to automatically escape normal % and _. Wildcards can be escaped using double backslashes '\\', e.g. \\* stands for a normal non-wildcard '*'.

The ListOfWikiPagesMacro now uses the AdvParseArgsPlugin.

Example

[[ListOfWikiPages(...,exclude=Trac*,exclude=tests/*,exclude=A?B)]]

This will exclude all wikis starting with Trac and tests/ as well as all three-character wikis which start with A and end with B.

comment:6 Changed 15 years ago by Russ Brown

Absolutely fantastic: thanks for turning this around so quickly.

This makes our "RustyPages" page 100% useful now: thanks a lot!

comment:7 Changed 15 years ago by Martin Scharrer

Just added exclude support for ListChangesBy and made a small bugfix: [6956]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Martin Scharrer.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.