You can say

PROCESS $someVal

as long as someVal contains the name of the template / block to process.
You can't construct an expression, though, like this:

PROCESS 'path/' _ $templateFile

That won't work.  You'd have to set up the variable to contain the full
template name and then you can PROCESS $variable

On Tue, Feb 22, 2011 at 4:14 PM, Summer <[email protected]> wrote:

>
> Hello,
>
> I have a question for you all :-)
>
> I have some code that uses a switch statement for display of content.
> Problem is, this content is different for MANY different situations and I am
> currently displaying like so...
>
> SWITCH someVAL
> CASE "someval1"  PROCESS some_block_correspondingInfo
> CASE "someval2"  PROCESS some_block_correspondingInfo2
>
> etc..
>
> but I can reduce my code by a huge amount if I can somehow PROCESS call to
> the string that comes in IF my string is the same name as my BLOCK.. ala.
>
> PROCESS eval($someVAL)
>
> does that make sense? this way I can name my blocks the same as the
> "someVals" across my site and just process to it?
>
>
> thanks -
>
>
>
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
>
>


-- 
Check out my LEGO blog at http://www.brickpile.com/
View my photos at http://flickr.com/photos/billward/
Follow me at http://twitter.com/williamward
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to