Hi,

would be so nice if somebody could improve the handling for hashes:

- adding elements
- overriding an element

Something like:

{def $additional_meta_tags = hash( 'og:title', $node.name,
                                                          'og:type', 'article',
                                                          'og:url',
concat( $node.url_alias|ezurl( 'no' ) )
                                                       )}

{if eq( $node.class_identifier, 'folder' )}
      {set $additional_meta_tags[ 'og:type' ] = 'folder'}
{/if}

{if $thumbnail}
      {set $additional_meta_tags[ 'og:image' ] =
$thumbnail.url_alias|ezurl('no')}
{/if}


I think there are some workarounds with merging arrays but that's not
very elegant.
I usually end up writing template operators so I can work with php arrays.

Regards,
   Philipp
-- 
Sdk-public mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/sdk-public

Reply via email to