Hi Dan, The reason I did not use 'Total Pages: <(search group=docs* fmt=count count=false)>' is that I was trying to run the search only once, get the value and store it in a variable to use in a number of places on the page (without running the search multiple times).
I will definitely give the template idea a go (haven't played with templates yet). Thanks. Jan On Wednesday, 27 January 2016 02:33:58 UTC+2, Dan wrote: > > Could you just do > > Total Pages: <(search group=docs* fmt=count count=false)> > > As for your question, though, if you change fmt to template it should > work. With fmt, the output is returned unprocessed--so the counter function > is not triggered within the search function. And since the output is > suppressed, it doesn't get triggered later as in the second case. > > But when you use template, each match runs through the entire markup table > so it gets processed before returned. With the output suppressed, you never > see that output, but it is all processed. So then the final counter > function should work. > > Cheers, > Dan > > > On Tue, Jan 26, 2016 at 8:13 AM TMurNGon <tmur...@gmail.com <javascript:>> > wrote: > >> Hi Dan, >> >> I've been trying to apply your example shown on the functions/counter >> page of the documentation, but I keep getting stuck... >> >> If I use the following it does suppress the output, but it also does not >> increment the counter (so the Total result remains 0 which is incorrect): >> >> {(search group=docs* fmt="[(counter id=total)]" count=false output=false)} >> Total Pages: <(counter 0 id=total)> >> >> >> If I use the following it does not suppress the output, but it does >> increment the counter correctly: >> >> {(search group=docs* fmt="[(counter id=total)]" count=false output=true)} >> Total Pages: <(counter 0 id=total)> >> >> Any suggestions on how I can set the correct value of Total without >> getting any output from the search? >> >> Thanks lots. >> Jan >> >> -- >> 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 boltwire+u...@googlegroups.com <javascript:>. >> To post to this group, send email to bolt...@googlegroups.com >> <javascript:>. >> Visit this group at https://groups.google.com/group/boltwire. >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 boltwire+unsubscr...@googlegroups.com. To post to this group, send email to boltwire@googlegroups.com. Visit this group at https://groups.google.com/group/boltwire. For more options, visit https://groups.google.com/d/optout.