Summer wrote:
> Lets say I have the following hash (see below).  I test for its 
> existence in a var the app returns by doing this:
> 
> IF order_ids.${somevar.blah}
> 
> So if I know it exists, I want to then show the actual order number, NOT 
> "1".
> 
> I've tried:
> order_ids.${somevar.blah}.key
> order_ids.${somevar.blah}.keys
> order_ids.${somevar.blah}.name
> order_ids.${somevar.blah}.value
> order_ids.${somevar.blah}
> 
> and I get either nothing or "1". If I was testing on, lets say, 2080058, 
> how would I get that value WITHOUT having to reiterate thru the hash (no 
> reiterations).

somevar.blah is your key you are testing. So just [% somevar.blah %]

Example:
[% IF order_ids.${somebar.blah} %]
  Order Number is: [% somebar.blah %]
[% END %]

-- Josh

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to