Forums / Install & configuration / Override conditions for ezxml datatypes

Override conditions for ezxml datatypes

Author Message

Christian Johansen

Wednesday 14 March 2007 2:57:21 am

I read from the documentation that content/datatype/view/*.tpl can be overridden with the class_identifier condition, so I tried:

[content_embed_image]
Source=content/datatype/view/ezxmltags/embed.tpl
MatchFile=content/datatype/view/ezxmltags/embed/image.tpl
Match[class_identifier]=image
Subdir=templates

No such luck! Did I interpret it wrong? If I remove the class_identifier condition, the override works, but for all embedded objects. If I display $object.class_identifier in this template, it clearly says 'image'. Did I misunderstand something?

Claudia Kosny

Wednesday 14 March 2007 3:34:47 pm

Hi Christian

I am not 100% sure but I think that the class_identifier means the class the contains the XML block which is viewed using this template. The class_identifier of the embedded object does not matter.

Claudia

Xavier Serna

Thursday 15 March 2007 9:05:51 am

I believe that you have problems with the path used in your override rule. Yo have to be sure that the actual tpl you want to use is in <your_design>/override/templates and then inside the path you put into your override definition.

This is an example of an override rule we use in one of our sites for embedded images:

Source=content/view/embed.tpl
MatchFile=embed/image.tpl
Subdir=templates
Match[class_identifier]=image

and works fine!
If you can get this working, enable debugoutput and showusedtemplates to view what templates are actually used, this can help a lot!

hth,

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205