solewniczak / dokuwiki-plugin-randompage2

GNU General Public License v2.0
0 stars 4 forks source link

Somethng missing from the documentation? #5

Open bortzmeyer opened 4 years ago

bortzmeyer commented 4 years ago

I installed and activated the plugin, from the Extension Manager. I want a "Random" link on every page. If I put:

Random

in my template main.php, or in a footer.html included file, nothing happens.

Is this something more I need to do?

In an ordinary page, adding the code "Random" works but it is not clear how to do it for every page.

solewniczak commented 4 years ago

The code <randompage_link>Random</randompage_link> is a part of wiki syntax and therefore works only where the dokiwki parser applies. This is why it doesn't work in main.php, or in a footer.html. If you want to use it here, copy the HTML code that is generated by dokwiki parser.

bortzmeyer commented 4 years ago

OK, adding:

A random page

in main.php works. May be worth an addition to the documentation?

KamarajuKusumanchi commented 1 year ago

To add to @bortzmeyer comment above

Appending ?do=randompage or ?do=nsrandompage to a page url will redirect to a random page within the wiki or within the namespace respectively.

Further, if you install the ShortcutKey Plugin (https://www.dokuwiki.org/plugin:shortcutkey) and map

  Set “Shortcut key to show random page within current namespace (Randompage plugin is required)” to N
  Set “Shortcut key to show random page (Randompage plugin is required)” to A

in the configuration settings, you can use a and n to get a random page within the wiki and within the namespace respectively.