History: PluginPage
Source of version: 3 (current)
Copy to clipboard
{syntax type="markdown" editor="wysiwyg"} {TAG(tag='u')}**This page was written by a novice and should be checked by an expert. Use at your own risk.**{TAG} ## Plugin Page (PluginPage) This plugin checks what page you are on, and if it matches to the passed-in parameter, the data portion is displayed on the wiki page. ### Usage The PAGE plugin usage is: {CODE()}{PAGE(page=pagename) /}data{PAGE}{CODE} Example: {CODE()}{PAGE(page=Guard)}{REDIRECT(page=Home) /}{PAGE}{CODE} Explanation of above Example: The PAGE plugin tests if the user is on wiki page named "Guard"; if so, the user is redirected to the Home page. Actual code from the plugin (lib/wiki-plugins/wikiplugin_page.php): {CODE()}function wikiplugin_page($data, $params) { global $page; if ($page == $params['page']) { return $data; } {CODE} Note: {pluginmanager plugin=page} {DIV(class=titlebar)}Related pages{DIV} - ((Wiki Plugin)) {DIV(class=titlebar)}Alias{DIV} - (alias(PagePlugin)) - (alias(Page))