Re: somevar = BLOCK and passing switches
Summer <crazysummer2004-/[email protected]> Wed, 8 May 2013 17:05:58 -0700 (PDT)
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
well, it won't work that way because I am using it as an anonymous block.. ie. [% some_name = BLOCK; # ton of data END; %] If I try to call it like so: PROCESS some_name, I get a stack trace which complains about that block not existing. The way you propose would be the standard block declaration: BLOCK some_name; END; That will work, but the problem is I don't want to process all that info again. I want to process it once then display that output 'n' number of times... except one of those times, I want some data omitted. thanks ________________________________ From: Larry Leszczynski <[email protected]> To: [email protected] Sent: Wednesday, May 8, 2013 4:49 PM Subject: Re: [Templates] somevar = BLOCK and passing switches Hi Summer - > [% some_name; token_to_omit =1 %] > > some_name does not respect that variable "token_to_omit" Did you try: [% PROCESS some_name token_to_omit=1 %] (No semicolon after "some_name".) http://www.template-toolkit.org/docs/manual/Directives.html#section_BLOCK HTH, Larry _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates