attribute_view_gui, objectrelations and translations

Author Message

Ulrich L.

Thursday 28 September 2006 2:29:42 pm

Hi all,
the line

{attribute_view_gui attribute=$node.object.data_map.my_objectrelations}

outputs the related objects, but does not take care of translations. What do you think is the easiest way to display the translated related objects?
Thanks for ideas,
Ulrich

Ulrich L.

Sunday 01 October 2006 5:21:11 am

Now my solution looks like this.:

{let my_relation_list=$node.object.data_map.my_objectrelations.content.relation_list}

{section var=Relations loop=$my_relation_list}

     {let current_object=fetch( content, object, hash( object_id, $Relations.item.contentobject_id, object_version, $Relations.item.contentobject_version) ) } (*  Do I really need this object_version thing...?  *}
     <a href={$current_object.main_node.url_alias|ezurl}>
        {attribute_view_gui attribute=$current_object.data_map.name}
     </a><br>
     {/let}
   
{/section}
{/let}

However, from my point of view there is still a contradiction between the two following statements:

{attribute_view_gui attribute=$node.object.data_map.my_xml_block}
{attribute_view_gui attribute=$node.object.data_map.my_objectrelations}

The first statement outputs translated content, the second statement doesn't!

When using objectrelations frequently, this really matters.
So I am still looking for a more elegant solution. Thanks for contributing to it!
U.

Ulrich L.

Sunday 01 October 2006 7:50:54 pm

This leads to the question wether there is a possibiliy to access the object's name defined by object's <b>name pattern in translated versions</b> as well?

In this case it would be possible to override the ezrelationslist.tpl with a modified version which takes care of the translations.

Does anybody know?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.