Creating custom design

Author Message

Ivan Švogor

Tuesday 28 September 2010 7:20:37 am

Hello,

I'm having issues creating my custom desing. I'm simply trying just add some text HELLO or I'M HERE in the pagelayout.tpl . But what ever I do it does not apper. I tryed to edit the one in /design/base and /desing/standard, clear cash from shell but still nothing. What am I doing wrong?

Help file says that pagelayout.tpl is the main template for the whole page. How, or better, where do I edit the existing one?

Matthieu Sévère

Tuesday 28 September 2010 7:30:29 am

Hello Ivan,

Did you try to empty your cache after your modiification ?

Anyway the good way to go is to override existing template and create a new custom design. You should read the template section of the documentation to get the logic : http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Templates

Good luck :)

--
eZ certified developer: http://ez.no/certification/verify/346216

Quoc Huy Nguyen Dinh

Tuesday 28 September 2010 7:49:27 am

Hi Ivan

Are you trying to modify the pagelayout.tpl from /design/base, /design/standard from the root of your eZ installation? If so then you won't be able to do this as most of the time these templates are overriden by an override template from an design extension.

For example if you have installed eZ Publish and have choosen to use ezwebin (Website Interface extension) then ~/design/standard/templates/pagelayout.tpl will be ignored and overriden by ~/extension/ezwebin/design/ezwebin/templates/pagelayout.tpl

It is not recommended to directly modify ~/design/standard/* or ~/design/base/*. It is also not recommended to modify the design templates of ezflow or ezwebin. Instead create your own design templates and copy over templates files from ezflow or ezwebin and modify your copy.

Example:

if you need to modify ~/extension/ezwebin/design/ezwebin/templates/pagelayout.tpl then:

Go to your ez publish root

mkdir extension/mydesign

install -d extension/mydesign/settings

install -d extension/mydesign/design/standard/templates

vi extension/mydesign/settings/design.ini.append.php

<?php /*

[ExtensionSettings]

DesignExtensions[]=mydesign

*/ ?>

cd ..

cp extension/ezwebin/design/ezwebin/templates/pagelayout.tpl extension/mydesign/design/standard/templates/

vi extension/mydesign/design/standard/templates/pagelayout.tpl

make your changes

now activate your extension:

vi settings/override/site.ini.append.php

Look for [ExtensionSettings], then look for ActiveExtensions[]=ezwebin

Add this before that line:

ActiveExtensions[]=mydesign

Clear caches and this should work.

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

Main resources:

Total runtime0.8460 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.0067 587.9063152.6250
Module start 'layout' 0.00670.0031 740.531339.4531
Module start 'content' 0.00980.8349 779.9844596.0391
Module end 'content' 0.84460.0014 1,376.023412.1719
Script end 0.8460  1,388.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3900160.0002
Check MTime0.00130.1521160.0001
Mysql Total
Database connection0.00120.147310.0012
Mysqli_queries0.754389.1597600.0126
Looping result0.00070.0839580.0000
Template Total0.814496.320.4072
Template load0.00200.238920.0010
Template processing0.812396.014820.4062
Template load and register function0.00110.129310.0011
states
state_id_array0.00130.155910.0013
state_identifier_array0.00120.146920.0006
Override
Cache load0.00180.2103460.0000
Sytem overhead
Fetch class attribute can translate value0.00060.069230.0002
Fetch class attribute name0.00160.194150.0003
XML
Image XML parsing0.02002.364530.0067
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.02172.5611240.0009
String conversion0.00000.000940.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
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
6content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs