[pmwiki-users] Deep linking

Daniel dkml at xs4all.nl
Fri May 14 15:23:03 CDT 2010


Randy Brown schreef:
> Try this, using the Cookbook:Request recipe:
> 
> *Page A:*
> Instructions
> 
> [[B?show=1 | Continue…]]
> 
> *Page B:*
> (:if !request show:) (:redirect A quiet=1:) (:ifend:)
> Links...
> 
> The above should always redirect users who are attempting to read page B
> to page A unless the URL link that they clicked on contains a "show"
> parameter. If you prefer to require going through page A only once, you
> can instead use the httpvariables recipe to set a cookie and then test
> for that.
> 
> Randy
> 

I don't think that would work. It is easy to obtain this new link and
then make a deep-link on the other site like

<a href="http://mypmwikisite.com/thisgroup/B?show=1">Great Downloads</a>

which would be accepted.

I was thinking that cookies might help. Page A sets a cookie which is
read by page B. If the cookie is missing, B redirects to A.
I have come as close to HttpVariables, but I find the docs not too clear...

Or what about something like:
--------code-----------
 *Page A:*
 Instructions

 [[B?show={$Date} | Continue…]]

 *Page B:*
 (:if !request show {$Date}:) (:redirect A quiet=1:) (:ifend:)
 Links...
---------/code-------------
If there is something like {$Date} in PMwiki, that would create a link
that changes every day!
Would that work?


> On May 13, 2010, at 5:08 AM, Daniel wrote:
> 
>> Is it possible to allow access to page B only after page A has been
>> visited?
> 




More information about the pmwiki-users mailing list