Include Plugin

Extract from plugin:include info page at dokuwiki.org.

Syntax

Simply enclose the ID of the page to be included in double curly brackets:

{{page>[id]#[section]&[flags]}}
{{section>[id]#[section]&[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
[flags] flags delimited by &, see flags optional

The plugin offers two syntaxes, {{page>...}} and {{section>...}}.

  • page doesn't attempt to merge indentation, allowing the include to be used within other block syntax modes - e.g. folded or boxes. Don't use multiple instances of {{page>...}} in the same section as it will cause indention problems.
  • section will attempt to align the include information with the current indentation level, allowing sections to be included seamlessly. This should only be used in plain DokuWiki markup as it will result in invalid XHTML if used within other blocks.

Section is aimed more at including sections and page at including whole pages, however both can be used to include whole pages or individual sections. The key difference is how they will interact with sections and block syntax modes on the host wiki page.

Configuration

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 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 plugin)
showtags Show/hide tags in the page footer (requires the tag plugin)
showeditbtn Show/hide edit button below the included page
usernamespace Namespace for user pages (see showuser configuration) (default user)

Macros

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
@DAY@ 2-digit day

Examples:

{{page>@MONTH@:@DAY@:birthdays}}
{{page>@USER@:message}}

Flags

You may use flags to override default settings of the firstseconly and showfooter options:

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
- - - noheader strips the title from the included page

Example:

{{page>concept&firstseconly&footer}}
 
plugin_syntax.txt · Dernière modification: 2009/08/06 20:46 (modification externe)
 
Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante :CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki