Possible? single out 1 out of 2 identical class-attributes in templates

Author Message

Martin Lekvall

Friday 21 January 2005 3:59:17 am

Hi all

A hint on this problem would be very appreciated

Situation:
We have a custom class, not very different from the Folder-class, but it contains two instances of the objectrelationlist-attribute as well as two instances of XMLtextfield.

Now we want to render one objectrelationlist in a surtain way, and the other objectrelationlist in another (same for the two xml-fields). Images, for example, needs to be a surtain size in the first and another size in the second objectrelationlist.. due to the different width of the columns they are shown in.

Problem:
We have not yet been able to single out which class-attribute are being processed in the view-templates.
have override template for speciffic class-attribut-name: seems not possible.

what we tried:
for example we have looked in the accessable variables in <i>ezobjectrelationlist.tpl</i> and <i>ezimage.tpl</i> if there is information about what name the current attribute has or what index the attribute have in the content-class ( using {$xyz|attribute(show,n)} ). i guess if we knew that, we could process/render the content in an alternative way.

have also tried to pass variables from the class-view-template down to <i>ezobjectrelationlist.tpl</i> and <i>ezimage.tpl</i>.
from class-view-template to <i>ezobjectrelationlist.tpl</i> works fine.

{attribute_view_gui attribute=$node.object.data_map.objlista1hoger whatAttribut="third"}

..and $whatAttribut is accessable in <i>ezobjectrelationlist.tpl</i>

from <i>ezobjectrelationlist.tpl</i> to <i>ezimage.tpl</i> does not, the way we tried.

{content_view_gui view=embed content_object=fetch( content, object,
                                                   hash( object_id, $Relations.item.contentobject_id,
                                                         object_version, $Relations.item.contentobject_version ) )
                                                   whatAttribut=$whatAttribut}

..and $whatAttribut does not show up in <i>ezimage.tpl</i>

any ideas on alternative solution?

thanks
/martin

EzP 3.5.0, OE 2.0
RH-EL3 2.4, mySql 4.1.7, php 4.3.9, apache 1.3.33

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 06:26:15
Script start
Timing: Jan 31 2025 06:26:15
Module start 'layout'
Timing: Jan 31 2025 06:26:15
Module start 'content'
Timing: Jan 31 2025 06:26:15
Module end 'content'
Timing: Jan 31 2025 06:26:15
Script end

Main resources:

Total runtime0.0136 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.0051 588.6094151.2734
Module start 'layout' 0.00510.0026 739.882836.7109
Module start 'content' 0.00770.0046 776.593890.2188
Module end 'content' 0.01230.0012 866.812529.9922
Script end 0.0136  896.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002417.5465140.0002
Check MTime0.00117.8168140.0001
Mysql Total
Database connection0.00074.814010.0007
Mysqli_queries0.002417.534230.0008
Looping result0.00000.080710.0000
Template Total0.00107.110.0010
Template load0.00085.558110.0008
Template processing0.00021.530410.0002
Override
Cache load0.00053.901410.0005
General
dbfile0.00107.000780.0001
String conversion0.00000.056240.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