Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Somethng missing from the documentation? #5

Open
bortzmeyer opened this issue May 3, 2020 · 3 comments
Open

Somethng missing from the documentation? #5

bortzmeyer opened this issue May 3, 2020 · 3 comments

Comments

@bortzmeyer
Copy link

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

<randompage_link>Random</randompage_link>

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 "<randompage_link>Random</randompage_link>" works but it is not clear how to do it for every page.

@solewniczak
Copy link
Owner

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
Copy link
Author

OK, adding:

A random page

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

@KamarajuKusumanchi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants