Forums / Suggestions / Template override for group of classes

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?