Include another wiki page into the current one.
{{page>wiki:syntax#Tables}}
will include the section about tables of the syntax page.
{{namespace>project_foo}}
will include all pages in the project_foo
namespace.
{{page>blog:mypage&tags&comments}}
will include the page blog:mypage
and show the tags from the tag plugin and the number of comments from the discussion plugin. Both plugins need to be installed for this example.
Simply enclose the ID of the page to be included in double curly brackets:
{{page>[id]&[flags]}} {{section>[id]#[section]&[flags]}} {{namespace>[namespace]&[flags]}} {{tagtopic>[tag]&[flags]}}
[id] | page ID of the page to include; some macros are possible; shortcuts are resolved (: , . , .. ) | required |
---|---|---|
[section] | limits the included page to a specific section and its subsections | optional; default is the whole page |
[tag] | include pages with tag topic tag, requires plugin:tag | required |
[flags] | flags delimited by & , see flags | optional |
The plugin offers four syntaxes, {{page>...}}
, {{section>...}}
, {{namespace>...}}
and {{tagtopic>...}}
.
Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a tagtopic
tag
.
The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the blog plugin which uses the include plugin to generate the blog page.
noheader | Don't display the header of the inserted section |
---|---|
firstseconly | Display only the first section of the included page |
showtaglogos | Show/hide an image for the first tag (if the page has tags) |
showfooter | Show/hide page footer below the included page |
showlink | Makes the first headline of a included page/section a link to the included page/section |
showpermalink | Show/hide a permalink to the included page in the page footer |
showdate | Show/hide creation date of the page in the page footer |
showuser | Show/hide user name of the page creator in the page footer |
showcomments | Show/hide number of comments in the page footer (requires the discussion plugin) |
showlinkbacks | Show/hide number of linkbacks in the page footer (requires the linkback or backlinks2 plugin) |
showtags | Show/hide tags in the page footer (requires the tag plugin) |
showeditbtn | Show/hide edit button below the included page |
doredirect | Redirect back to original page after an edit |
usernamespace | Namespace for user pages (see showuser configuration) (default user ) |
doindent | Indent included pages relative to the section of the page they get included in |
linkonly | Display only a link instead of the whole page content |
title | Show the title instead of the page id |
pageexists | Only list page ids of existing pages (see existlink ) |
existlink | Display a link and do so only if page page-id exists |
noparlink | Don't put the link into a par environment (for inline lists) |
Simple macros are possible to serve a page on a per user or per date base. These are:
@USER@ | username |
---|---|
@NAME@ | full name of user |
@GROUP@ | first group the user belongs to |
@YEAR@ | 4-digit year |
@MONTH@ | 2-digit month |
@WEEK@ | 2-digit ISO week number |
@DAY@ | 2-digit day |
@DATE<expr>@ | use a calculated date instead of today in date macros |
<expr> in @DATE<expr>@
can be one of:
PYEAR | previous year |
---|---|
NYEAR | next year |
PMONTH | previous month |
NMONTH | next month |
PWEEK | previous week |
NWEEK | next week |
YESTERDAY | yesterday's date |
TOMORROW | tomorrow's date |
Examples:
{{page>@MONTH@:@DAY@:birthdays}}
includes the page birthdays
in namespace <month>:<day>: eg. 10:15: birthdays
for the 15th of october.
{{page>@USER@:message}}
incudes the page message
from the namespace <user> of the logged in user
{{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
includes the page <weekno> from the namespace foo<year>
with next week's date e.g. foo2012:01 for the 27th of december 2011
You may use flags to override default all configuration settings:
Setting | Default | Alternative | ||
---|---|---|---|---|
firstseconly | fullpage | includes the whole page | firstseconly | includes only the first section of a wiki page |
showfooter | footer | shows a footer below the page with info about the included page | nofooter | hides the page info footer |
showeditbtn | editbtn | shows a button to edit (or create) the included page | noeditbtn | hides the edit (or create) button |
noindent | fullpage | page section and header retained on the same level as source page | noheader | strips the title from the included page |
Examples:
{{page>concept&firstseconly&footer}} {{page>mypage&noindent}}