====== randominc Plugin ====== ---- plugin ---- description: Randomly select a page from a namespace and include it the current page author : LarsDW223 (previous author: Vittorio Rigamonti) email : rigazilla@gmail.com type : syntax, helper lastupdate : 2018-04-28 compatible : Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather depends : include conflicts : similar : tags : include, random downloadurl: https://github.com/LarsGit223/dokuwiki-plugin-randominc/archive/master.zip sourcerepo : https://github.com/LarsGit223/dokuwiki-plugin-randominc bugtracker : https://github.com/LarsGit223/dokuwiki-plugin-randominc/issues donationurl: screenshot_img: ---- ===== Description ===== This is a useful plugin, if you want to include a randomly chosen page from a namespace, into the current one. Consider the use of Randominc if you want to change a static part of a page, to a randomly chosen part. ==== Requirements ==== This plugin uses the [[plugin:include|include plugin]] and therefore it requires the include plugin to be installed. ==== Syntax ==== Enclose the namespace from where to select the page in double curly brackets. Refer to [[include|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 ''[[include#syntax|page]]'' syntax of Include Plugin. * ''randomincsec'' //should// work as ''[[include#syntax|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:''%%{{randominc>namespace2&max-height: 250px}}%%'' * ''%%{{randomincsec>:playground:test#abc&nofooter&noheader&noeditbtn}}%%'' \\ where test is a folder and #abc is a headline ==== Additional Flags ==== From release 2017-08-04 on, the Random Include plugin also supports all flags which are supported by the [[plugin:include#configuration_and_flags|Include Plugin]]. E.g. ''%%{{randominc>:playground:test&link}}%%'' would make the first heading of the included page be rendered as a link. ===== Development ===== Changes: {{rss>https://github.com/LarsGit223/dokuwiki-plugin-randominc/commits/master.atom}} ===== Translations ===== The plugin is translated into Russian, English, and German. Thanks a lot to the translators, new languages are very welcome! Please use the [[https://translate.dokuwiki.org/plugin/randominc|DokuWiki Localization Tool]]. ===== Bugs ===== To report bugs or suggest features, **please** use [[https://github.com/LarsGit223/dokuwiki-plugin-randominc/issues|GitHub Issues]]. The author does not monitor this page. ===== Tips ===== * If you don't want to use a specific NS, you can use ''%%{{randominc>*}}%%''. * If you experience problems with caching, try adding ''%%~~NOCACHE~~%%'' to the page. ===== Discussion ===== Tested on Release 2014-09-29d "Hrun", it's work perfectly. --- [[user>alinea|Alinea]] //2015-07-17 22:14// Included on http://pe.hillschmidt.de under Release 2017-02-19b „Frusterick Manners“ - perfect!