Forums / Setup & design / Creating custom design

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.