Hello Petko / List,<div><br></div><div>About the following Option $:Var=*{$Opt1}*,*{$Opt2}* How can I list or count them only when they are not empty?</div><div><br></div><div>In my case now Opt1, Opt2 etc come from using forms with the request option</div>
<div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 19px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; ">
<br></pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; ">(:input form method=get:)
(:input default request=1:)</pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; ">
<br></pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; ">Regards,</pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; ">
Edwin</pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; "><br></pre><pre style="font-size: 0.9em; font-family: 'Lucida Console', 'Andale Mono', 'Courier New', Courier, monospace; line-height: 1.2em; margin-top: 0px; margin-bottom: 0px; ">
<br></pre></span></div><div><br></div><div><br></div><div><div><br></div><div><br><br><div class="gmail_quote">On Sat, Jul 25, 2009 at 6:47 AM, Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr">5ko@5ko.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Friday 24 July 2009 15:18:02 edwin marte wrote:<br>
> There are a few ones where I use checkboxes so what I then have is<br>
> something like this: :variable: opt1,opt2,opt3<br>
><br>
> I need no to do is to make a pagecount for these variables with checkboxes.<br>
> I have not been able to make an accurate count yet. It should be easy,<br>
> probably somebody else hade done already and could give me some hints.<br>
><br>
> Here is my pagelist to produce a simple Pagecount<br>
><br>
> (:if false:)<br>
> [[#template]]<br>
> (:template first:)<br>
> (:template each:)<br>
> (:template last:)<br>
> {$$ PageCount}<br>
> [[#templateend]]<br>
> (:if:)<br>
<br>
</div>Hi. If you only need to produce a number, use the built-in, faster "fmt=count"<br>
instead of fmt=#template.<br>
<div class="im"><br>
> How can I make the pagelist to count the pages for any combination of the<br>
> options (opt1 only, opt2 Only, opt1 and opt2, opt3 and opt1 , etc) ?<br>
<br>
</div>1. Values starting with "-" are always excluded, like:<br>
<br>
$:Var=-Opt1 -- the value of :Var: is not "Opt1"<br>
-- counts :Var:Opt1,Opt2 but not :Var:Opt1<br>
<br>
$:Var=-*Opt1* -- the value of :Var: does not contain "Opt1"<br>
-- counts neither :Var:Opt1,Opt2 nor :Var:Opt1<br>
<br>
<br>
2. A comma means inclusive OR, except for 1. above.<br>
<br>
$:Var=Opt1<br>
-- counts :Var:Opt1 but not :Var:Opt1,Opt2<br>
<br>
$:Var=*Opt1*<br>
-- counts :Var:Opt1 and :Var:Opt1,Opt2<br>
<br>
$:Var=Opt1,Opt2<br>
-- counts :Var:Opt1 and :Var:Opt2 but not :Var:Opt1,Opt2<br>
<br>
$:Var=*Opt1*,*Opt2*<br>
-- counts :Var:Opt1 and :Var:Opt2 and :Var:Opt1,Opt2,Opt3<br>
<br>
$:Var=*Opt1*,*Opt2*,-*Opt3*<br>
-- counts :Var:Opt1 and :Var:Opt1,Opt2 but not :Var:Opt2,Opt3<br>
<br>
$:Var=*Opt1*Opt2*,*Opt2*Opt1* -- contains both Opt2 and Opt1<br>
-- counts :Var:Opt1,Opt2 and :Var:Opt2,Opt1 and :Var:Opt2,Opt3,Opt1<br>
<br>
Thanks,<br>
<font color="#888888">Petko<br>
<br>
</font></blockquote></div><br></div></div>