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

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