[pmwiki-users] Conditional Content based on pagelist.

Peter Bowers pbowers at pobox.com
Sat Mar 13 04:23:15 CST 2010

On Fri, Mar 12, 2010 at 7:45 PM, Mark Bacas <mbacas at gmail.com> wrote:
> I have the below on a page in my system:
> =================================
> %green%'''Open Partner Portal Issues'''
> (:pagelist fmt=#GTDlist order=-time
> group=GTD.2010*,-GTD.GTD,-GTD.RecentChanges $:context=partner,
> $:status=open:)
> =================================
> I'd like it If the pagelist ends up not containing any pages to not
> display this section at all.
> Right now, I end up with a green "Open Partner Portal Issues" header
> but nothing under it. I only want the heading to show up if there is
> content to display under it.

Put the line

%green% Open Partner Portal Issues%%

in a (:template first:) section in your PageListTemplate.  You can
also use (:template none:) if you want to display something else when
no pages match.  See this page:


For more detail on putting together these templates.  Note that it's a
good idea to put any modified templates in the current page or
Site.LocalTemplates so they don't get over-written in
Site.PageListTemplates when you do an upgrade.


More information about the pmwiki-users mailing list