[pmwiki-users] Have pagelist condition : if result not null, then print pagelist

ABClf languefrancaise at gmail.com
Fri Apr 16 11:15:49 PDT 2021


Well, well, one, sorry for the delay (I have a growing kid at home
leeching my free time...).
Two, sorry for the unclear question ; I was wrong : in case of
(:template first:) (:template each:) pagelist format (yes, for
inserting a heading before results are shown), pmwiki doesn't print
out template first when 0 result is found, which is the behaviour I
was expecting you to help me to get.
Three, thank you for your helping answers : no matter the question
asked was not silly, your indulgent answers lightened the right
direction (what you need is what pmwiki does by default).

Four, thank you for your help !

Le mer. 14 avr. 2021 à 11:33, Petko Yotov <5ko at 5ko.fr> a écrit :
> Pagelist usually shows nothing if there are no pages in the list.
> Unless you have a (:template none:) section -- it only appears when
> there are no pages.
> If you want to show something, like a heading, before the first result
> (when there is a first result), then use (:template first:). That
> section can be there in addition to (:template first {=$Group}:)
> I suspect I don't understand what is the exact problem, if so, please
> elaborate.
> Petko
> On 13/04/2021 05:21, ABClf wrote:
> > I don't know if it's possible to have a pagelist condition like : if
> > $MatchCount < 1 ;
> > in my case, I would like a pagelist to be printed only when there is
> > some positive result found.
> > If request gives nothing, then print nothing.
> >
> > Specifically, I use pagelist like this to collect linked citations :
> > (:pagelist group=Citation link=Bob.{*$Name} list=all fmt=#citation2:)
> > and I would like to have result printed out only when results are
> > found.
> > Is that doable ?

More information about the pmwiki-users mailing list