[pmwiki-users] Can Pagelist filter on two link values?

Martin Fick mogulguy at yahoo.com
Tue Jun 13 20:07:17 CDT 2006


--- David Spitzley <dspitzle at wash.k12.mi.us> wrote:
> With the blog/wiki I'm implementing, I was thinking
> it might be nice in the Category pages to
> distinguish between blog posts and non-blog posts. 
> However, I'm not sure I can do that, since blog
> posts are themselves defined by belonging to
> Category.Blog.  Can Pagelist take two different
> values for the link= parameter?  Ideally I'd like to
> be able to do the following in Category.GroupFooter:
> 
> !!Blog Entries
> (:pagelist -GroupTemplate fmt=simple
> link=Category.{$Name},Category.Blog list=normal:)
> 
> !!Other Pages
> (:pagelist -GroupTemplate fmt=simple
> link=Category.{$Name},-Category.Blog list=normal:)
> 
> But that doesn't work.  Any suggestions?


One not-so-pretty way to do this is:

(:pagelist Name=*-GroupTemplate link=Category.{$Name}
list=normal fmt=#BlogSimple:)

[[#BlogSimple]]
(:pagelist name={=$FullName} fmt=#simple
link=Category.Blog:)\
[[#BlogSimpleEnd]]



For the opposite:

(:pagelist Name=*-GroupTemplate link=Category.{$Name}
list=normal fmt=#NoBlogSimple:)

[[#NoBlogSimple]]
(:pagelist name={=$FullName} fmt=#simple
link=-Category.Blog:)\
[[#NoBlogSimpleEnd]]


One limitation I ran into testing this idea is that I
think you will see weird stuff if you hit your
MaxIncludes limit which happens rather quickly.  

It seems like this behavior could be adjusted so that
the MaxIncludes does not get incremented unless a
different file is included, this way each time the
template is included for a sub pagelist, it does not
count against the limit.  To do this though, care
would have to be taken to avoid infinite recursions.

Hope this helps,

-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