[pmwiki-users] Random page generator?
StefCT
stefct4 at gmail.com
Sun Oct 25 19:25:47 CDT 2015
Regarding my last e-mail, for clarification, the entire code (to be used
in the SideBar) should look like this:
(:pagelist group=PmWiki order=random count=1 fmt=Site.SideBar#randomPage
list=normal:)
(:if false:)
[[#randomPage]]
[[{=$FullName}|Show random page]]
[[#randomPageend]]
(:ifend:)
Stef
On 10/26/2015 01:16 AM, StefCT wrote:
> Hi Don,
>
> On 10/26/2015 12:26 AM, Donald Z. Osborn wrote:
>> Thank you. This works great - at least the first time. Adding it to sidebar
>> (my aim) seems complicated.
>>
> If you are using the code in the SideBar, you probably need to change
> the first line to:
>
> (:pagelist group=PmWiki order=random count=1 fmt=Site.SideBar#randomPage
> list=normal:)
>
> Otherwise PmWiki will be unable to find the page list template named
> "randomPage".
>
> Does this solution work? In my wiki, it works fine.
>
> Stef
>
>
>
>>
>> On Sun, Oct 25, 2015 at 5:49 PM, StefCT <stefct4 at gmail.com> wrote:
>>
>>> On 10/25/2015 10:30 PM, StefCT wrote:
>>>
>>>>
>>>> On 10/25/2015 10:14 PM, Donald Z. Osborn wrote:
>>>>> Greeetings, Is there a way to generate (call up and open) random pages
>>> in
>>>>> the same way MediaWiki does?
>>>>
>>>> How about
>>>>
>>>> (:pagelist group=PmWiki order=random count=1 fmt=#redirectto
>>> list=normal:)
>>>>
>>>> (:if false:)
>>>> [[#redirectto]]
>>>> (:redirect {=$FullName}:)
>>>> [[#redirecttoend]]
>>>> (:ifend:)
>>>
>>>
>>> Actually, there is a solution maybe even easier than my first
>>> suggestion... You could also skip the redirect and try:
>>>
>>> (:pagelist group=PmWiki order=random count=1 fmt=#randomPage list=normal:)
>>>
>>> (:if false:)
>>> [[#randomPage]]
>>> [[{=$FullName}|Show random page]]
>>> [[#randomPageend]]
>>> (:ifend:)
>>>
>>> This markup will display a link "Show random page". This link will lead
>>> to a different page from the group "PmWiki" each time you reload the
>>> page containing the link.
>>>
>>> Kind regards,
>>>
>>> StefCT
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> pmwiki-users mailing list
>>> pmwiki-users at pmichaud.com
>>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>>
>>
>
More information about the pmwiki-users
mailing list