randominc plugin

Compatible with DokuWiki

2006-11-06

plugin Randomly select a page from a namespace and include it the current page.

Last updated on
2007-12-31
Provides
Syntax, Helper

Tagged with include, random

Description

This plugin is untested and is provided as is, I developed it just for my university project. Check it before use.

This is a useful plugin, if you want to include a randomly chosen page from a namespace, into the current one.

This plugin is directly derived from include plugin, to which I added a random page selection derived from random_page.

Consider the use of Randominc if you want to change a static part of you page, to a randomly chosen part.

Syntax

Enclose the namespace from where to select the page in double curly brackets. Refer to Include Plugin for detailed information here are only described the added functionallities.

{{randominc>[ns]#[section]&[flags]}}
[ns] namespace from which select the page to include

The plugin offers two syntaxes, {{randominc>...}} and {{randomincsec>...}}.

  • randominc works as page syntax of Include Plugin.
  • randomincsec should works as section syntax.

Arguments

You may use two arguments to control the presentation of the random content:

Name Value Effect Example
max-height A valid CSS size Content height limit max-height: 100px
max-width A valid CSS size Content width limit max-width: 200px

Examples

  • {{randominc>namespace1&max-height: 200px}}
  • you can include the random content into a box:<box 80% round blue | Random Content>{{randominc>namespace2&max-height: 250px}}</box>
  • {{randomincsec>:playground:test#abc&nofooter&noheader&noeditbtn}}
    where test is a folder and #abc is a headline
plugin/randominc.txt · Last modified: 2010/10/06 20:03 by HÃ¥kanS
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate