[pmwiki-devel] Detecting existence of Trail

Kathryn Andersen kat_lists at katspace.homelinux.org
Mon Jun 25 02:17:57 CDT 2007


Is there some way that I can detect the existence of a trail on a given
page?  I know that if I do a pagelist where trail=Some.Page and there
isn't a trail then there won't be any output.  But is there some way of
creating an (:if condition:) that will detect that?

The reason I want this, is that I want to be able to say

if there is a trail on the current page
        do nothing
else
        do this pagelist
ifend

This is basically to save me effort and have interim content.
To take a specific example, I have stuff about books on my site, and one
of the pieces of information is whether they belong to a series.
If they do, they link to the Series index:

Series:[[Series/This Series]]

Now, the Series.ThisSeries page, when fully created, is intended to have
a trail linking all the books in that series, in their correct order.
But I can't always put that information in straight away.  What I would
like to be able to do, in the interim is at least have a pagelist in the
Series.GroupFooter page, which only displays when the current page (say,
Series.ThisSeries) does NOT have a trail in it.  The pagelist would be
something like
(:pagelist group=Books link={*$FullName} fmt=#title:)

This would at least list all the books in that series, even if it
doesn't list them in the correct order.

Is there some way of doing this?

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe



More information about the pmwiki-devel mailing list