Child Pages

A macro for listing the first-level subpages (child pages) of the current page. This macro can be run in sidebars, so that you get child page listing for every page in your wiki automatically. The intention is to improve site navigation, as you just have to call the macro once, and it will work for all pages, and child pages will be listed on a single, common place.


Parameters

Name

Description

Default value

on

List of allowed actions separated by |. If current action is not in the list, then macro will not be executed. If the list starts with not:, then they are denied actions: current action must be anything else to allow child page listing. The value on=all will allow any action.

show

title

A title for the child page list. May contain one %s which will be replaced by the page name. When none no title is displayed.

None

none_note

A note to show when no child page is found. When none notification is disabled.

None

more_link

Customized label for more pages link when not all child pages are being listed. When none a default label will be used.

None

max_pages

Max child pages to list.

0 (no limit)

max_name

Max page name length.

0 (no limit)

use_list

Use a list as output format. When false a paragraph will be used for each item.

True

spaces

Separate wiki names by space.

True


Example

<<ChildPages(on=not:edit|AttachFile|LocalSiteMap, more_link=More..., max_pages=7, title=<h3>%s</h3>)>>
<<ChildPages(on=not:edit|AttachFile|LocalSiteMap, more_link=More..., max_pages=7, title=<h3>In this page</h3>, max_name=17, spaces=False)>>

example1.png example2.png

MoinMoin: MacroMarket/ChildPages (last edited 2020-12-26 12:18:14 by RenatoSilva)