Hi,
I'm trying to have a series of links in the style of a paging bar, but I 
have the impression that we cannot do maths on template variables.

Usually, I want "first - ... - previous - current - next - ... - last", but 
I also want to avoid repeating pages and I want to avoid using "..." 
between adjacent pages.

>From the results I get, I would say that  [if less {+count} { {+matches} - 
2 }] does as if it were [if less {+count} {+matches}]. I also tried using 
[if less {+count} {(math "{+matches} - 2" )}] but this gets apparently 
always evaluated to false.
Thus, when the current page is the beforelast one the output contains an 
unwanted "- ... " before the link to the last item, and when the current 
page is the antepenultimate one, the output has an unwanted "- last - ... " 
also before the link to the last item.

My code is the following:
<div style="width:100%;text-align:center;"><(search group={parents}.+ 
when='gamedate {+p}' template=siblingspaging count=false join=false)></div>
/*[[#siblingspaging]]
[(template first)][if ! equal {+p} {p} && ! equal {+next} {p}][[{+p}|+]] 
-[if]
[(template each)][if equal {+p} {p}][if more {+count} 2][if more {+count} 
3] ... -[if] [[{+prev}|+]] -[if] [[{+p}|+]] [if less {+count} { {+matches} 
- 2 }]- [[{+next}|+]] [if less {+count} { {+matches} - 3 }]- ... 
[if][if][if]
[(template last)][if ! equal {+p} {p} && ! equal {+prev} {p}]- 
[[{+p}|+]][if]
[[#endsiblingspaging]]*/


Anyone knows how I what I should change to get the desired result?

Cheers and thank you in advance for any help,
Tiffany/Maelite

-- 
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/boltwire.
For more options, visit https://groups.google.com/d/optout.

Reply via email to