Random Link Plugin
Last modified by Thomas Mortagne on 2026/02/26 15:33
| Generate an HTTP link to a random page in the current wiki |
| Type | Plugin |
| Category | |
| Developed by | xwiki:XWiki.jurevert |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
The RandomlinkPlugin has only one method to call:
$xwiki.randomlink.getRandomURLPage()Example
#set($ur=$xwiki.randomlink.getRandomURLPage())
<a href="$ur">Random link...</a> (to $ur)Generates a link of the type /xwiki/bin/view/XWiki/randomspace/randompage
Prerequisites & Installation Instructions
Follow these steps:
- Add the JAR in your container classpath (WEB-INF/lib)
- Edit xwiki.cfg and add the following line to the list of plugins :
xwiki.plugins=\ [...] ... ,\ <plugin package> - Restart your container
- Verify the plugin is properly installed by typing the following in a wiki page :
{{velocity}} $xwiki.<plugin name>.name {{/velocity}}If the installation has been successful, you will see <plugin name>.
Copy the jar-Archive to the %xwikipath%/WEB-INF/lib/ directory of your xwiki installation and add com.xpn.xwiki.plugin.randomlink.RandomlinkPlugin to the xwiki.cfg file.