[pmwiki-users] Parameters in Pagelists

Kathryn Andersen kat_lists at katspace.homelinux.org
Fri Jul 14 18:03:24 CDT 2006


On Fri, Jul 14, 2006 at 03:55:40PM -0400, The Editor wrote:
> I'm working on a fairly complex scheduling system for PmWiki but ran
> into a small snag.  Is there any way to send parameters to a pagelist
> template, such as the following:
> 
> (:pagelist fmt=#tasks group=Projects Date param1=begin param2=end:)
> 
> Enabling a custom pagelist like the following:
> 
> (:include {=$FullName}#param1#param2 :)

Well, seeing as Pm said this isn't possible right now, you might be able
to get some use out of the #includXref format, which solves this problem
by using existing variables, in this case, page names.

http://www.pmwiki.org/wiki/Cookbook/PagelistTemplateSamples#IncludeXref

fmt=#includeXref

This is a generalization of the #includefaq format. Include a section
from a page which has an anchor with the same name as the current page
your pagelist is on.

[[#includeXref]]
(:include {=$FullName}#{$Name}:)
[[#includeXrefend]]

So, if in your case you want your tasks to be related to dates, like
July13, then on one page you would have

[[#July13]]
* stuff needing to be done by this date
* item 2 yadda yadda yadda
[[#July13end]]

And then have another page, called July13, which would have the
following pagelist:

(:pagelist Group={$Group} fmt=#includeXref [[#{$Name}]]:)

That will consider only pages which have the current page as an anchor
name, and will include everything from that anchor to the next anchor.

You could put this in a group footer.

I use this in my Links group on my site (http://www.katspace.org/Links/)
where I have groups of links which fit into more than one category, so I
define them on a section of one page, and they get automatically
included in the other page.

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-users mailing list