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.

eZ debug

Timing: Jan 31 2025 04:29:57
Script start
Timing: Jan 31 2025 04:29:57
Module start 'layout'
Timing: Jan 31 2025 04:29:57
Module start 'content'
Timing: Jan 31 2025 04:29:57
Module end 'content'
Timing: Jan 31 2025 04:29:57
Script end

Main resources:

Total runtime0.0158 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.3750151.2422
Module start 'layout' 0.00590.0033 739.617236.6953
Module start 'content' 0.00910.0052 776.312590.1875
Module end 'content' 0.01440.0015 866.500029.9922
Script end 0.0158  896.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002817.8782140.0002
Check MTime0.00127.2632140.0001
Mysql Total
Database connection0.00095.653510.0009
Mysqli_queries0.002515.994730.0008
Looping result0.00000.106810.0000
Template Total0.00116.910.0011
Template load0.00085.086410.0008
Template processing0.00031.773710.0003
Override
Cache load0.00063.520310.0006
General
dbfile0.00032.146880.0000
String conversion0.00000.057240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs