Share » Forums » Developer » problem with hash

problem with hash

problem with hash

Thursday 07 February 2008 7:28:30 am - 4 replies

Author Message

André R.

Thursday 07 February 2008 7:48:55 am

You can not set a hash like that in templates, you have to create a new hash and use 'merge' to merge them.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Damarev .

Thursday 07 February 2008 8:28:05 am

Sorry, I made a mistake.... what I really want is to change the value of an already defined key in the hash, not creating a new one:

{def $aHash = hash( 'property' , 'A string' )}
{set $aHash.property = 'Another string' }

André R.

Thursday 07 February 2008 9:02:51 am

The template language in eZ Publish still doesn't support setting properties, so you still need to use merge.The template language in eZ Components on the other hand does ( if I remember correctly ) and it is scheduled to replace the one in eZ Publish hopefully during 2008.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Damarev .

Monday 11 February 2008 4:15:41 am

Thanks André.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu