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

eZ debug

Timing: Jan 18 2025 02:52:36
Script start
Timing: Jan 18 2025 02:52:36
Module start 'content'
Timing: Jan 18 2025 02:52:36
Module end 'content'
Timing: Jan 18 2025 02:52:36
Script end

Main resources:

Total runtime0.0148 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.8516180.8203
Module start 'content' 0.00520.0049 768.671994.0547
Module end 'content' 0.01010.0046 862.726670.7031
Script end 0.0147  933.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002214.5703120.0002
Check MTime0.00106.9760120.0001
Mysql Total
Database connection0.00074.983810.0007
Mysqli_queries0.002114.092440.0005
Looping result0.00000.088820.0000
Template Total0.004329.210.0043
Template load0.00085.674810.0008
Template processing0.003523.509510.0035
Override
Cache load0.00064.015110.0006
General
dbfile0.00043.0222100.0000
String conversion0.00000.038730.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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