Forums / Setup & design / How to unset a key/value pair in a hash?

How to unset a key/value pair in a hash?

Author Message

Thomas Nunninger

Thursday 16 February 2006 10:57:55 pm

Hi,

in some cases I want to delete one key in my $view_parameters hash because of nicer urls. But the following does not work:

  {undef $view_parameters.key}

Also I have no idea how to use the remove operator on a hash.

Any idea?

Have a nice day

Thomas

Thomas Nunninger

Thursday 16 February 2006 11:12:10 pm

I found out, that

{set $view_parameters.key = false()}

works for google.tpl. So my problem is solved at the moment. But perhaps there are some more general solutions for removing a key from a hash?

Have a nice day

Thomas