Tuesday 15 March 2005 4:10:49 am
Hi, I'm using the following template code to decide which option in a drop down box that should be selected:
{section name=Child loop=$partner_accounts}
<option value="{$:key}" {switch match=$level.partner_objects[$:key]}{case match=true}SELECTED{/case}{case}{/case}{/switch}>{$:item}</option>
{/section}
The code works fine, but the debug gives the following error: No such attribute for array(1): *$:key* Of course, the attribute with the specific key will not always be present, and that's exactly the purpose of the check. So, how can I make my code "debug-friendly"?
Sincerely,
Eirik Alfstad Johansen
http://www.netmaking.no/
|