Forums / Setup & design / attribute_view_gui, objectrelations and translations

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?

eZ debug

Timing: Jan 18 2025 19:05:39
Script start
Timing: Jan 18 2025 19:05:39
Module start 'content'
Timing: Jan 18 2025 19:05:40
Module end 'content'
Timing: Jan 18 2025 19:05:40
Script end

Main resources:

Total runtime1.0301 sec
Peak memory usage4,096.0000 KB
Database Queries192

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.9375180.8125
Module start 'content' 0.00660.8575 768.7500445.3594
Module end 'content' 0.86410.1659 1,214.1094333.4688
Script end 1.0300  1,547.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00500.4863210.0002
Check MTime0.00160.1578210.0001
Mysql Total
Database connection0.00100.096510.0010
Mysqli_queries0.959093.10171920.0050
Looping result0.00200.19301900.0000
Template Total0.999697.020.4998
Template load0.00230.225220.0012
Template processing0.997396.813320.4986
Template load and register function0.00020.015710.0002
states
state_id_array0.00160.159010.0016
state_identifier_array0.00090.088720.0005
Override
Cache load0.00190.1854230.0001
Sytem overhead
Fetch class attribute can translate value0.00130.130120.0007
Fetch class attribute name0.00130.123330.0004
XML
Image XML parsing0.00040.037220.0002
class_abstraction
Instantiating content class attribute0.00000.000630.0000
General
dbfile0.00370.3556210.0002
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs