Share » Forums » Developer » Overriding View Templates For Datatypes

Overriding View Templates For Datatypes

Overriding View Templates For Datatypes

Friday 23 May 2003 1:20:58 am - 2 replies

Author Message

Selmah Maxim

Friday 23 May 2003 3:43:13 am

Hi ..

u can copy /design/standard/templates/content/datatype/view/ezobjectrelation.tpl

to
/design/MYDISIGN/templates/content/datatype/view/ezobjectrelation.tpl

Let`s say u wanna get foreach class another look from Ezobectrelation, the pass vars to ezobectrelation.tpl :

{attribute_view_gui attribute=$node.object.data_map.related_object Classid=7}

then is ezobectrelation.tpl :

{switch match=$Classid}
{case match=7}{*class # 7}
LALALA
{/case}
{case match=8}{*class # 8}
LALALA
{/case}
.
..
{/switch}

thats it !

Tristan Koen

Friday 23 May 2003 6:50:50 am

Hi Selmah,

Thanks for the idea. It would definitely work, but it is a bit of a hack. Surely there must be a mechanism within the ezPublish framework that would do the trick?
If there is no such mechanism, then I have to question why bother with related objects? It is far cleaner and more maintainable to place an object reference into an XML text attribute (in my opinion anyway).

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu