Loading...
 
Skip to main content

History: PluginPage

Source of version: 2 (current)

Copy to clipboard
            ===__This page was written by a novice and should be checked by an expert.  Use at your own risk.__===

!! 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}

-=Related pages=-
* ((Wiki Plugin))

-=Alias=-
* (alias(PagePlugin))
* (alias(Page))