[pmwiki-users] pagelist with additional information

Martin Fick mogulguy at yahoo.com
Wed Jun 14 11:12:47 CDT 2006


--- Daniel Hofer <daho at borntofly.ch> wrote:
> Damn, I've never used templates before. They are so
> great;-)

Cool! :)  We are only now starting to run into some of
the major glitches in their design, since people are
starting to use them for creative things. :) I'm
hoping that we can solve some of those soon, it will
take a while to really establish some of the use cases
though.

 
> > [[#BilledTemplate]]
> > * {=$Title}, (:include {=$FullName}#Billed:)
> > [[#BilledTemplateEnd]]
> > 
> > 2)  This may not have the proper spacing (I think
> it
> > will put the second page list on a separate line)
> 
> yes, thats right. The billed-entry is on the second
> line.

I think that this is a limitation of the include
directive.  Suggest a good use case fix and maybe
Patrick will implement it.


> > [[#BilledTemplate]]
> > * {=$Title}, (:pagelist trail={=$FullName}
> > fmt=#BilledTF:)
> > [[#BilledTemplateEnd]]
> > 
> > [[#BilledTF]]
> > (:if equal {=$Group} Billed:){=$FullName}(:if:)
> > [[#BilledTFEnd]]

This case will probably also give you spacing
problems.  I am really starting to think that there
needs to be an extension to pagelist templates to be
able to pass arguments to the template.  This would
allow something like this:

[[#BilledTemplate]]
(:pagelist trail={=$FullName}
fmt=#BilledTF  arg={=$Title}:)
[[#BilledTemplateEnd]]
 
[[#BilledTF]]
(:if equal {=$Group} Billed:)* {$arg}, 
{{=$FullName}(:if:)
[[#BilledTFEnd]]

Notice the title passed to the second pagelist as an
argument.  The syntax may need adjusting, but I hope
you get the idea.  I will work on something like that
soon and maybe provide a recipe.  Let me know if that
would seem particularly useful to you?  
 
> crazy...I put it in my Site.LocalTemplates
> and added the following page on a testpage:
> (:pagelist group=Arbeitszeiten list=normal
> fmt=#BilledTemplate:)
> 
> Now this site appears many times within my page:
> http://www.pmwiki.org/wiki/Site/PageListTemplates
> (only the first two parts: Brief Syntax Explanation
> and fmt=#default)
> 
> crazy...

I think what you are seeing here are the results of
MaxIncludes being hit, how many pages are your
returning?  I notices some (what seemed to be very
weird) stuff last night while running similar tests
for  another pagelist example on pmwiki.org.  I think
the way that the pmwiki include function works is that
it outputs the name of the included file once its
MaxInclude limit has been reached.  This would explain
the injection of lots of strange
Site.PageListTemplates references.  See if upping your
include limit solves this problem.

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list