override template feature

Author Message

vincenzo dima

Sunday 11 March 2007 11:48:15 am

I'am design a website with 3 main section; I want a templates for home and a different template for a section. I started from corporate_site package: in design/corporate_site/override/templates i put my pagelayout.tpl for home page e section.tpl file for section layout.

In settings/siteaccess/.. I add the following rules to file override.ini.append.php
[section]
Source=../../corporate_site/override/templates/pagelayout.tpl
MatchFile=progetto.tpl
Subdir=../../corporate_site/override/templates
Match[section]=69

but it don't work....

Thank for help
B.R.
vincenzo

 

christian bencivenni

Tuesday 13 March 2007 3:37:04 am

Try specifing the path of progetto.tpl in the Match option.

Xavier Serna

Tuesday 13 March 2007 4:03:12 am

Hi vincenzo,

you have an error in your override definition, try this:

[section]
Source=pagelayout.tpl
MatchFile=progetto.tpl
Subdir=templates
Match[section]=69

You have to put yout progetto.tpl inside override/templates folder. And this rule applies only for section id 69.

hope this helps,

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

vincenzo dima

Wednesday 21 March 2007 1:29:41 am

Thanks for hints..
At end ..I replaced home page with a different layout using this code in my override.ini.append.php file:
[homepage]
Source=pagelayout.tpl
MatchFile=homepage.tpl
Subdir=templates
Match[node]=2

Now my new home page can be accessed only add a slash "/" at end of address but I think
this issue can be skipped with a Apache RewriteRule.. I hope
Thanks a lot
Vincenzo

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:21:51
Script start
Timing: Jan 18 2025 16:21:51
Module start 'layout'
Timing: Jan 18 2025 16:21:51
Module start 'content'
Timing: Jan 18 2025 16:21:52
Module end 'content'
Timing: Jan 18 2025 16:21:52
Script end

Main resources:

Total runtime1.2651 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0469152.6250
Module start 'layout' 0.00520.0025 741.671939.4453
Module start 'content' 0.00771.2561 781.1172579.2344
Module end 'content' 1.26380.0012 1,360.351612.1641
Script end 1.2650  1,372.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2545160.0002
Check MTime0.00140.1083160.0001
Mysql Total
Database connection0.00070.054610.0007
Mysqli_queries1.214696.0143620.0196
Looping result0.00060.0462600.0000
Template Total1.234397.620.6171
Template load0.00220.174620.0011
Template processing1.232097.391220.6160
Template load and register function0.00010.009810.0001
states
state_id_array0.00090.074410.0009
state_identifier_array0.00330.259720.0016
Override
Cache load0.00190.1469360.0001
Sytem overhead
Fetch class attribute can translate value0.00060.051230.0002
Fetch class attribute name0.00110.083450.0002
XML
Image XML parsing0.00070.058130.0002
class_abstraction
Instantiating content class attribute0.00000.000850.0000
General
dbfile0.00080.0627160.0000
String conversion0.00000.000540.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs