Template override

Author Message

Salvatore Guarino

Monday 25 July 2005 2:34:14 am

I want to create some template override for a new class, that I've just created duplicating the product class.

1st question: it's possible to assign the same templates ovverride of the product class to this new class? If yes, how?

2nd question: if I create overrides from the admin interface, i cannot put the new override templates in the same directory of the product override templates (i.e. /design/corporate/override/templates/full/). I can only save the new templates in the "/design/corporate/override/templates" and not in subdirectories. Is there a simpy way to do it?

Thx,

Salvatore

Ɓukasz Serwatka

Tuesday 26 July 2005 4:14:46 am

Ad.1

Add in override.ini.append.php file

[product_full]
Source=node/view/full.tpl
MatchFile=full/product_full.tpl
Subdir=templates
Match[class]=20

[second_product_full]
Source=node/view/full.tpl
MatchFile=full/product_full.tpl
Subdir=templates
Match[class]=21

Of cousre this is example and you will have to change class id to correct. The trick is with using the same file MatchFile=full/product_full.tpl but with different matching and name in []

Ad.2

When you using admin interface for creating templates, new template files are stored in design/corporate/override/templates. If you want organize them in folders you will have to change entries in override.ini.append.php file for MatchFile.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Salvatore Guarino

Tuesday 26 July 2005 5:55:57 am

Thank you very much Luke!

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 19 2025 04:34:55
Script start
Timing: Jan 19 2025 04:34:55
Module start 'layout'
Timing: Jan 19 2025 04:34:55
Module start 'content'
Timing: Jan 19 2025 04:34:56
Module end 'content'
Timing: Jan 19 2025 04:34:56
Script end

Main resources:

Total runtime1.0542 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 589.0547152.6094
Module start 'layout' 0.00810.0027 741.664139.4141
Module start 'content' 0.01081.0418 781.0781545.6172
Module end 'content' 1.05260.0015 1,326.695312.1875
Script end 1.0541  1,338.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3080160.0002
Check MTime0.00130.1189160.0001
Mysql Total
Database connection0.00130.121710.0013
Mysqli_queries1.000894.9361570.0176
Looping result0.00070.0627550.0000
Template Total1.018596.620.5092
Template load0.00180.168520.0009
Template processing1.016796.442820.5084
Template load and register function0.00010.010910.0001
states
state_id_array0.00150.141410.0015
state_identifier_array0.00160.151520.0008
Override
Cache load0.00140.1363200.0001
Sytem overhead
Fetch class attribute can translate value0.00080.076420.0004
Fetch class attribute name0.00160.153450.0003
XML
Image XML parsing0.00120.117920.0006
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00110.1088250.0000
String conversion0.00000.000640.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs