Contents
IncludeWikiContent
Description
A macro to include another wiki page content with the context set to current page
Conceptually this macro is similar to the builtin <<Include(...)>> macro with the difference, that wiki content gets rendered within the current page context (all sub-page links starting with / will evaluate to current page/...). This way you can create some shared admin bars, link bars and reference there your parent pages or sister pages (e.g. navigation bar) without any problems.
This inclusion introduced is recursive (included pages get their IncludeWikiContent macro evaluated as well) - therefore, remember to refer to inclusions via absolute path. Relative addressing gets resolved in respect to the primary page.
SuperHeader | +- SuperHeader/SubHeader1 | | | ` SuperHeader/SubHeader1/ButtonBar | `- SuperHeader/SubHeader2
Concluding, the main differences between Include and IncludeWikiContent can be displayed in a table:
Primary including page is: Home/MyProject |
||
NavBar content |
<<Include(Common/NavBar)>> |
<<IncludeWikiContent(Common/NavBar)>> |
[[/SubPage]] |
Common/NavBar/SubPage |
Home/MyProject/SubPage |
[[..]] |
Common |
Home |
<<Action(edit)>> |
edit NavBar |
edit MyProject |
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
1.2 |
1.8, 1.9 |
Bugfix release |
Usage
Use this macro to include common elements of your wiki, such as standard subpages, headers etc...
Example
<<IncludeWikiContent(ProjectTemplate/AdminBar)>>
See /Examples
Copyright
Copyright © Konrad Jelen (Stellars Henson), NobleProg Ltd. (StellarsHenson)
License
GNU GPL
Bugs
Discussion
Included page security constraints were not evaluated, which may have caused abuses (including someone's private pages). Has been fixed in the newest release (1.1) -- StellarsHenson 2009-03-23 13:15:50
May be look at the argumentparser for macros e.g. MoinAPI/Beispiele#Hello_World
Hi, good point, i'll do it for next release. Currently it's not that needed - it's one arg only -- StellarsHenson 2009-03-23 22:59:13
Just confirmed, that macro works fine with version 1.9beta2 -- StellarsHenson 2009-03-27 03:53:12
Today, i have updated the patch, so that in v1.9beta2, when user doesn't have read privileges to include a page, None word won't be displayed. -- StellarsHenson 2009-03-27 09:42:49