[Templates] Hash key with whitespace
Mike Friedman
friedo@friedo.com
Thu, 26 Oct 2006 13:55:39 -0400
------=_Part_36089_17759921.1161885339173
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Perhaps this is a stupid question, but I can't seem to find the answer in
TFM.
How do you look up a hash value whose key has a space in it?
I tried:
[% foo."bar baz" %] and [% foo.${bar baz} %]
but each of these results in a syntax error.
I can use a workaround:
[% SET key = "bar baz" %]
[% foo.$key %]
But I'm sure there must be a better way.
Mike
------=_Part_36089_17759921.1161885339173
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Perhaps this is a stupid question, but I can't seem to find the answer in TFM.<br>
<br>
How do you look up a hash value whose key has a space in it?<br>
<br>
I tried:<br>
<br>
[% foo."bar baz" %] and [% foo.${bar baz} %] <br>
<br>
but each of these results in a syntax error. <br>
<br>
I can use a workaround:<br>
<br>
[% SET key = "bar baz" %]<br>
[% foo.$key %]<br>
<br>
But I'm sure there must be a better way.<br>
<br>
<br>
Mike<br>
------=_Part_36089_17759921.1161885339173--