[pmwiki-users] PAGELIST / Wikiform PTV List Search

edwin marte edwin.marte at leidba.com
Tue Mar 9 07:57:30 CST 2010


Ok, I got a partial solution to what I needed. I managed it using filters
using substr markup like

(:pagelist group=testgroup  $:Var=C{(substr {$Opt1} 1 5)}a*,*O{(substr
{$Opt2} 1 5)}t*,-"":)  that works for me (probably there could be simpler
but that was I did)

The thing is that I filter them  only when certain words appear (specially
at the beginning and at the end of the word) in my ptv and I can get not
listing them when they are empty

But now I have another question, I have another pagelist which looks simpler
(:pagelist group=testgroup  $:Var="{$Opt1},{$Opt2}":)

Opt1 and Opt2 are in Definition list Format and Could have  spaces. I have
no figure it out how not to list $Var when both Opt1 and Opt2 are empty, the
pagelist list all items/entries when they are empty. I tried things like
(:pagelist group=testgroup  $:Var={$Opt1} ,{$Opt2},-"":) but that does not
work, I need using the Quotes because of the spaces and (:pagelist
group=testgroup  $:Var="{$Opt1} ,{$Opt2}",-"":) would not work either

Any Pointers ?

Edwin




On Sun, Feb 28, 2010 at 3:21 AM, edwin marte <edwin.marte at leidba.com> wrote:

> $:Var=?* does not do the trick for me or at least I don´t know how to place
> it in the pagelist. When the Form is submitted with one of the values unset
> then the pagelist shows all the pages even the empty ones.
>
> What happens is the following: Var could have one, two, all or none of 3
> possible values set in a page.
>
> (:Var: Value1:)
> (:Var: Value1,Value2:)
> (:Var: Value1,Value2,Value3:)
> (:Var: Value1,Value3:)
> (:Var: Value2,Value3:)
> (:Var: Value2:)
> (:Var: Value3:)
> (:Var: :)
>
> Ej;
> http://localhost/index.php/testgroup/Query?Opt1=Value1&Opt2=Value2&valuesent=1&Search=Submit+Query
>
> Then I have a Query page where I have 3 checkboxes to select what value to
> filter in the pagelist
>
>
> (:input form method=get:)
> (:input default request=1:)
>
> (:input checkbox name=Opt1 value=Value1:)Value1
> (:input checkbox name=Opt2 value=Value2:) Value2
> (:input checkbox name=Opt3 value=Value3:)Value3
>
> (:input hidden valuesent value=1:)
>
> (:input submit Search:)
> (:input end:)
>
> (:if equal {$?valuesent} 1:)
> (:pagelist group=testgroup  $:Var=*{$Opt1}*,*{$Opt2}*,*{$Opt3}*:)
> (:if:)
>
> This pagelist is shown only when form is submitted . httpvariables are
> enable, I have no used them all the time I´ve been just trying for a
> workaround for this, that is why.  I know $:Var=?* would not list the empty
> ones but don´t know how to handle it in my case. Any help appreciated.
>
> Thanks Peter for Replying though,
>
> Edwin
>
>
>
>
>
>
>
>
> On Sat, Feb 27, 2010 at 8:20 AM, Peter Bowers <pbowers at pobox.com> wrote:
> >
> > On Fri, Feb 26, 2010 at 7:19 PM, edwin marte <edwin.marte at leidba.com>
> wrote:
> > > Hello Petko / List,
> > > About the following Option   $:Var=*{$Opt1}*,*{$Opt2}*    How can I
> list or
> > > count them only when they are not empty?
> >
> > $:Var=?*
> >
> > that requires $:Var to have *some* value.
> >
> > -Peter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100309/91cb6039/attachment.html 


More information about the pmwiki-users mailing list