I'm actually using that functionality in counters in a fun way:

I generate a list of counter id's based on the pages in a group, which
become account.1000, account.10001, etc
[[#zero]]
...
[[#end]]
I go through a list of transactions and add the sum of the debet side
of the transaktion to the counter with the id={+:debet}
[[#generate]]
...
[[#end]]
I go through my list of pages in the group account, and only accounts
with counters with a result !equal '0'.
[r][c]{account.1001:title}: [c] [(counter + 0 id={+p} output=true)]

result: A beutifuly filtered list of results from only one pass
through the transaction-list.

because you're worth it.


On Apr 19, 5:35 pm, The Editor <[email protected]> wrote:
> On Mon, Apr 13, 2009 at 9:44 PM, DrunkenMonk <[email protected]> wrote:
>
> > Sorry to resurrect a dead thread, but I'm using templates within
> > templates, so I thought I'd reuse it.
>
> > I need to have a search function inside atemplate. I need to format
> > the output according to the pagename of the result.
>
> > {+p} refers to the target of thetemplate.
>
> > I need something like {++p} to refer to the target of the search
> > inside thetemplate. Does it exist?
>
> > I need this both for "fmt" and "if".
>
> > If one ever uses templates within templates, this is vital. With it,
> > one can chain templates endlessly. Without it, one is pretty screwed.
>
> > I'm using it to accomodate some accounting stuff built with boltwire.
> > I need to zero a counter for each account in agroup, inside a
> > search ... yeah I'm not going to explain this so anyone understands
> > it. Holy crap it's 4 am. But I really need {++p} functionality or an
> > alternative.
>
> I'm not sure exactly what you are thinking, but I kind of have the
> gist of it.  I think if you use external templates (ietemplate=some.page) you 
> won't have any problem. If you can't, or
> prefer not to, you might try doing `{+p} to block atemplatefrom
> processing the first time, but allowing it to process the second time.
> Not sure this will work, but it's worth a try.
>
> We also have a built in counter function that may make things a whole
> lot easier.  You can have multiple counts going simultaneously by
> giving each a unique id. Something like [(counter id=column1 "+"
> output=true)]. It actually has quite a few powerful options. Don't
> know if there is a good tutorial up but I'd be happy to get you
> started if you can't find any info at BoltWire, or can't make heads or
> tails of the code.
>
> Cheers,
> Dan
--~--~---------~--~----~------------~-------~--~----~
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