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

Martin Fick fick at fgm.com
Wed Nov 23 16:51:23 CST 2005

On Wed, Nov 23, 2005 at 04:37:54PM -0600, Patrick R. Michaud wrote:
> On Wed, Nov 23, 2005 at 01:38:40PM +0100, sven saurwein wrote:
> > hi list.
> > 
> > (1) redirect +  conditional markup
> > (:redirect:) seems to ignore any conditional markup.
> > so
> > (:if authid:) (:redirect group.page:)
> > vs.
> > (:if !authid:) (:redirect group.page:)
> > both redirect.
> > Am I getting something wrong here?
> No, the (:redirect:) markup has traditionally been somewhat "special"
> in that its existence overrides everything else that might be
> in the markup.  A page containing (:redirect:) doesn't have any
> of its other markup processed at all--it just jumps directly to
> the redirected page.
> So, this is why (:redirect:) isn't working in conditionals, or
> in group headers/footers.
> 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...
> Pm
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users

  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.


More information about the pmwiki-users mailing list