How do I...Vary the layouts?

Author Message

Luc Chase

Tuesday 14 October 2003 3:31:13 am

I've managed to customise the main pagelayout.tpl template to my site, but all of my content is following that one template. How to I get different types of content to use a different template? For example I might want the pagelayout.tpl for the home page but a slightly different layout for the other pages of the site which have a different layout for more text. How do I associate an item of content or a type of content with a template? I suspect that it is something in the overides but I can't workout how to make the connection.

The Web Application Service Provider

Karsten Jennissen

Tuesday 14 October 2003 5:10:45 am

You are correct, you use the override.ini to define which template is used.

See http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates

What did you do to customize the pagelayout.tpl? Did you start with copying the /design/demo folder to /design/yourdesign, set up the /settings/siteaccess/yoursite/site.ini.append to point to /design/yourdesign, etc.?

If you did all that, then /settings/siteaccess/yoursite/override.ini.append is what you edit to match the pages with templates.

Karsten

Luc Chase

Tuesday 14 October 2003 8:21:52 am

Okay, thanks for the link to the appropriate bit of documentation. I'm working through it now.

I know NOW that I should have done a new design directory and created my template for my new site there but I didn't. I used the corporate design files and just edited them (extensively) until I arrived at where I am now.

A few more questions...
What is the difference between the overides.ini and the overides.ini.append? Is it generally correct to edit the .ini.append rather than the .ini whenever possible? Does the .ini.append list extra 'exceptions' to the .ini ?

I created a folder within a folder and then added a product, but in user mode, although the site displays the product it also invites the user to create a custom template for the product ( I think it is using the 'last-resort' standard-design template because 'corporate' does not use products ) ; I've tried to configure a template from the bookshop design but still I get the 'Default object view. Click to create a custom template' prompt... do I still need to edit an overide.ini and/or overide.ini.append file to get it (Class ID: 8) to use my new product template?

Finally, what is the variable I need to reference to get the 'owner id' of the individual product instance? I want to send an e-mail to notify the original 'owner/editor' of the original (or current) version of the product whenever it is ordered. i.e. If there are two different products in the basket of an order, I'll need to send two different e-mails to the two people (suppliers) who entered the products into the system.

The Web Application Service Provider

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

Main resources:

Total runtime0.6506 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.0049 589.0313152.6250
Module start 'layout' 0.00490.0036 741.656339.4453
Module start 'content' 0.00850.6405 781.1016499.0313
Module end 'content' 0.64900.0015 1,280.132812.1641
Script end 0.6505  1,292.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4726160.0002
Check MTime0.00130.2022160.0001
Mysql Total
Database connection0.00070.100410.0007
Mysqli_queries0.605893.1237570.0106
Looping result0.00060.0886550.0000
Template Total0.621495.520.3107
Template load0.00170.267820.0009
Template processing0.619795.254620.3098
Template load and register function0.00020.026110.0002
states
state_id_array0.00120.180510.0012
state_identifier_array0.00100.158920.0005
Override
Cache load0.00140.2182170.0001
Sytem overhead
Fetch class attribute can translate value0.00070.113620.0004
Fetch class attribute name0.00120.180230.0004
XML
Image XML parsing0.00020.032020.0001
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00070.1018100.0001
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
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/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: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0003 secs