<div dir="ltr"><div><div><div>Thank you. This works great - at least the first time. Adding it to sidebar (my aim) seems complicated.<br><br></div>As you say it requires reloading the page with the code. I tried right clicking and opening in new tab, and each time got the same page. What I'm hoping to do is put the code in the sidebar to permit a user to sample pages, or at lest not to get the same random page if the click on "Show random page" twice before they load or reload another page.<br><br></div>I tried it in the sidebar to see, and the command looks perfect in preview, and fine when saved (remember that in saving the sidebar you see SideBar as a page as well as in the sidebar itself). Click on it, and it generates a random page, but then disappears. ... Reload the page (the one just generated randomly) and the Show random page is still not there ... go to another page (via wikilink) and still not there (since one hasn't reloaded the sidebar).<br><br></div>Not criticizing, as the coding is beyond my reach. <br><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 25, 2015 at 5:49 PM, StefCT <span dir="ltr"><<a href="mailto:stefct4@gmail.com" target="_blank">stefct4@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/25/2015 10:30 PM, StefCT wrote:<br>
<br>
><br>
> On 10/25/2015 10:14 PM, Donald Z. Osborn wrote:<br>
>> Greeetings, Is there a way to generate (call up and open) random pages in<br>
>> the same way MediaWiki does?<br>
><br>
> How about<br>
><br>
> (:pagelist group=PmWiki order=random count=1 fmt=#redirectto list=normal:)<br>
><br>
> (:if false:)<br>
> [[#redirectto]]<br>
> (:redirect {=$FullName}:)<br>
> [[#redirecttoend]]<br>
> (:ifend:)<br>
<br>
<br>
</span>Actually, there is a solution maybe even easier than my first<br>
suggestion... You could also skip the redirect and try:<br>
<br>
(:pagelist group=PmWiki order=random count=1 fmt=#randomPage list=normal:)<br>
<br>
(:if false:)<br>
[[#randomPage]]<br>
[[{=$FullName}|Show random page]]<br>
[[#randomPageend]]<br>
(:ifend:)<br>
<br>
This markup will display a link "Show random page". This link will lead<br>
to a different page from the group "PmWiki" each time you reload the<br>
page containing the link.<br>
<br>
Kind regards,<br>
<br>
StefCT<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" rel="noreferrer" target="_blank">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</a><br>
</div></div></blockquote></div><br></div>