Template override for group of classes

Author Message

Salvatore Guarino

Monday 12 September 2005 2:56:03 am

I'm creating some classes to rapresent some tables with different fields. I have the class 'table1', 'table2', 'table3' etc. I can use the same template for all this class, but I have to specify one template override for every class, like this example:

[table1]
Source=content/view/full.tpl
MatchFile=full/table1.tpl
Subdir=templates
Match[class_identifier]=table1

[table2]
Source=content/view/full.tpl
MatchFile=full/table2.tpl
Subdir=templates
Match[class_identifier]=table2

etc...

My suggestion is to create a match for group of classes. If my tables are in a group of classes named "tables", the result maybe will be:

[all table]
Source=content/view/full.tpl
MatchFile=full/all_table.tpl
Subdir=templates
Match[group_class_identifier]=tables

Bye,

Salvatore Guarino

Kristof Coomans

Monday 12 September 2005 3:23:08 am

From:
http://ez.no/products/ez_publish_cms/documentation/customization/custom_design/override_templates

<b>Match[class_group]</b>
Matches class group id, available from 3.5

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Salvatore Guarino

Monday 12 September 2005 4:22:09 am

Great!

Tank you very much,

bye,

Salvatore Guarino

Salvatore Guarino

Monday 12 September 2005 6:10:16 am

I have tried using eZ publish 3.6, but doesn't work.
Maybe I have to do something to activate this functionality?

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 18 2025 16:10:45
Script start
Timing: Jan 18 2025 16:10:45
Module start 'layout'
Timing: Jan 18 2025 16:10:45
Module start 'content'
Timing: Jan 18 2025 16:10:46
Module end 'content'
Timing: Jan 18 2025 16:10:46
Script end

Main resources:

Total runtime0.9192 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 588.0313152.6406
Module start 'layout' 0.00820.0053 740.671939.4766
Module start 'content' 0.01350.9044 780.1484559.7656
Module end 'content' 0.91800.0012 1,339.914112.1406
Script end 0.9191  1,352.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3882160.0002
Check MTime0.00140.1566160.0001
Mysql Total
Database connection0.00140.153310.0014
Mysqli_queries0.866694.2777600.0144
Looping result0.00050.0561580.0000
Template Total0.879695.720.4398
Template load0.00220.240920.0011
Template processing0.877495.454820.4387
Template load and register function0.00010.008610.0001
states
state_id_array0.00090.093710.0009
state_identifier_array0.00170.184320.0008
Override
Cache load0.00180.1978260.0001
Sytem overhead
Fetch class attribute can translate value0.00060.067520.0003
Fetch class attribute name0.00090.094060.0001
XML
Image XML parsing0.00080.092420.0004
class_abstraction
Instantiating content class attribute0.00000.001380.0000
General
dbfile0.00090.0979230.0000
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs