Menu

Commit [r4683]  Maximize  Restore  History

!TitleIndex macro: add a `depth` parameter, for not showing pages that are deeper than a given level in the hierarchy.

- `0` means pages at the same level as the given prefix
- `1` means one level deeper than the given prefix (etc. for higher numbers)
- `-1` means any depth

Examples:
{{{
[[TitleIndex(PageTemplates/, depth=0)]]
}}}

This will list the immediate children of PageTemplates (note that "/" was part of the prefix).

{{{
[[TitleIndex(PageTemplates, depth=1)]]
}}}

This will list the immediate children of PageTemplates and PageTemplates itself.

Implements #4653.

cboos 2007-02-05

changed /trunk/trac/wiki/macros.py
/trunk/trac/wiki/macros.py Diff Switch to side-by-side view
Loading...
Auth0 Logo