It is possible to do something like this:

[(counter id=myvar '{(somefunc)}' output=true)]

Then to retrieve it elsewhere...

[(counter id=bob = output=true)]

The first sets it to your counter var bob and saves it as a global,
and the second retrieves it without incrementing that value (the =).

But it will not work if the you try to retrieve the value before it
has been set, such as in a side bar loaded before the main zone...

Cheers,
Dan

P.S. You might do better to create a custom function that does
something similar, setting a variable, and then using a custom markup
to simply inject that number as needed.



On Sun, Oct 25, 2009 at 8:58 PM, jacmgr <[email protected]> wrote:
>
> I have a template that calls a function and the function returns a
> value
> The template looks like this:
> ----
> There are [(somefunction arg1={+:id})]  words.
> ----
>
> So when template is run on the search results I can get correct
> result, such as
> There are 5 words.
> There are 6 words.
> There are 0 words.
> There are 102 words.
> There are 51 words.
>
> I would like to use the result value several times in a more
> complicated template without haveing to call the function again, but I
> haven't figured out how to do that.  I tried this template:
>
> -------
> newvar: [(somefunction arg1={+:id})]
>
> There are {+::newvar}  words.  [if equal {+::newvar} 5]You hit the
> jackpot[else]Sorry no jackpot, you only have {+::newvar} words[if]
> --------
> And some variations of that, but can;t seem to make it work.
>
> -------
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to