[pmwiki-users] (:redirect:) with conditional markup/ GroupHeader

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 23 17:04:16 CST 2005


On Wed, Nov 23, 2005 at 05:51:23PM -0500, Martin Fick wrote:
> On Wed, Nov 23, 2005 at 04:37:54PM -0600, Patrick R. Michaud wrote:
> > However, with PmWiki 2's model of handling directives I don't see
> > why it couldn't be adjusted to work from inside (:include:) and
> > (:if:) conditionals.  I'll see about adding it in the 2.1.beta
> > series...
> 
>   Yikes, definetely don't make it work inside of includes
> unless it works in conditionals.  I have several pages that
> rely on the fact the a redirect does not work for includes.
>
>   Why you might ask?  Well ,imagine a page meant to hold
> mostly raw data that is presented more nicely on another
> page.  If anyone happens to stumble on the raw data page, it
> gets redirected to the nicely formatted page.  But it can
> safely be included from the 'pretty' page.

No problem, it can be made to work in conditionals
(it's actually harder to make it not work in conditionals).

And (:redirect:) will be smart enough not to redirect to
itself.  So, in your example above, if the included raw data
page redirects to the pretty page, then the redirect in
the pretty page would have no effect.  (This doesn't solve
the problem of a raw data page being included in multiple
pretty pages, but for that situation a conditional would work.)

Pm




More information about the pmwiki-users mailing list