Author
|
Message
|
Jack Heard
|
Monday 12 April 2010 10:51:24 am
I understand the override process but what I don't understand is the naming conventions or directory structures used within your documentation. I am simply trying to edit the pagelayout.tpl file and have no idea how to list the new template within the override.ini.append.php file. The directory structure makes no sense and I really need to get this done. Are there any simple examples of what one might put if they want to add a override for the pagelayout.tpl file? Thanks so much - Jack
|
Bertrand Dunogier
|
Tuesday 13 April 2010 2:27:04 am
Trying to edit eZ Publish templates without any knowledge of its design principles kind of is a gamble, trust me. I had tried, back a few years ago. Design wise, eZ Publish is not easy to grasp, but once you understand it, you'll realize how powerful these features are. You could start by reading this documentation page: http://ez.no/doc/ez_publish/technical_manual/4_x/concepts_and_basics/designs. It will help you understand what a design is, in eZ Publish terms. Basically: you do not edit the default design files, you override them in custom designs. This will be better explained on this specific page: http://ez.no/doc/ez_publish/technical_manual/4_x/concepts_and_basics/designs/design_combinations. To summarize what you'll learn, here is how it could go if you want to use your own pagelayout.tpl file:
- create a new subfolder in design, like 'mydesign', ending up with design/mydesign/.
- in this folder, create these subfolders: templates, override/templates, and stylesheets.
- edit the site.ini.append.php file of your public siteaccess (you can, and should, read more about siteaccesses here: http://ez.no/doc/ez_publish/technical_manual/4_x/concepts_and_basics/configuration/site_management).
- in this file, you'll find a block that looks like this (the content depends on the packages you chose at install time):
[DesignSettings]
SiteDesign=ezwebin
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=base
SiteDesign is the main design used by your siteaccess, and matches a design folder that has the same name. AdditionalSiteDesignList is a list of additional designs used in a cascading way.
- What you need here is to make your siteaccess use your custom design, mydesign, instead of ezwebin. The modified configuration could look like this:
[DesignSettings]
SiteDesign=mydesign
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base
- Clear the caches using the backoffice (Setup)
- From now on, any design item you place in your custom design folders will be used instead of the ones in ezwebin, base or standard. Copy the pagelayout.tpl file currently in use to design/mydesign/templates), and start modifying it.
This looks a bit impressive, but you'll quickly realize how powerful it also is. And I'm a bit old school when it comes to eZ Publish; maybe others will have more 'begginer-friendly' instructions for you !
Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier
|
Nicolas Pastorino
|
Tuesday 13 April 2010 3:39:57 am
A slightly similar question was asked recently, which may provide you with additional information, on top of Bertrand's insightful one : http://share.ez.no/forums/setup-design/i-need-a-little-quick-help#comment58346 Cheers,
--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board
eZ Publish Community on twitter: http://twitter.com/ezcommunity
t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye
|
Jack Heard
|
Tuesday 13 April 2010 7:59:27 am
This does help a lot but I am not able to get the cache to clear for some reason. I created a directory specific to my design. Created all 4 directories as you mentioned and added my pagelayout.tpl to the templates folder and then cleared ALL cache via the back office panel and no difference in design. I of course added the site default within the site.ini file and it simply won't work for me?Is anyone available to help me fast. I would be happy to pay for your time. I simply find this system a bit too confusing.Thanks,-Jack
|
Jack Heard
|
Tuesday 13 April 2010 8:01:42 am
In addition, why are all of the images missing from the documentation? That is hurting me as well.
|
Doug Brethower
|
Tuesday 13 April 2010 10:05:31 am
Bertrand, thank you for explaining this in a few paragraphs! Very concise, practical, real world document. We need more like this. I followed your instructions to the letter on a fresh ezwebin 4.3 install. Then in the copied pagelayout.tpl, I removed the top menu just for fun by removing these lines: <!-- Top menu area: START -->
{if $pagedata.top_menu}
{include uri='design:page_topmenu.tpl'}
{/if}
<!-- Top menu area: END -->
Cleared the cache, reloaded the front page, the top menu disappeared as expected. Pasted the code back in, cleared the cache, reloaded the browser window, top menu re-appeared. One clarification, which applies generally and can be a source of confusion. Any time the instructions say to copy or create files and directories, be certain to also clone the permissions structures. Web servers are picky about that kind of stuff. And yes, the images are missing from the docs.
Doug Brethower
Apple Certified Technical Consultant, Southwest, MO USA
http://share.ez.no/directory/companies/lakedata.net
|
Nicolas Pastorino
|
Wednesday 14 April 2010 1:38:19 am
"
This does help a lot but I am not able to get the cache to clear for some reason. I created a directory specific to my design. Created all 4 directories as you mentioned and added my pagelayout.tpl to the templates folder and then cleared ALL cache via the back office panel and no difference in design. I of course added the site default within the site.ini file and it simply won't work for me?Is anyone available to help me fast. I would be happy to pay for your time. I simply find this system a bit too confusing.Thanks,-Jack
"
Hi Jack, Where did you create the 'mydesign' folder ? Could you give us a view of its content (directory structure until second depth level matters here) ? Cheers,
--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board
eZ Publish Community on twitter: http://twitter.com/ezcommunity
t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye
|
Bertrand Dunogier
|
Wednesday 14 April 2010 2:09:14 am
Jack, first, we indeed need what Nicolas asked for. I'm sure it'll be figured out quickly. Then, as Nicolas also said above, we/you would get lots of very valuable information if you enable debugging as explained on http://share.ez.no/forums/setup-design/i-need-a-little-quick-help#comment58346.
Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier
|
E AX
|
Thursday 15 April 2010 6:15:40 am
Bertrand, I completed all the steps you mentioned but i am having a few problems! Firstly, whenever i clear the cache the template goes back to the ezwebin template and not my template. What could cause this as it is extremely annoying and i dont know what the problem might be! It picks up my new template and it works, but as soon as i clear the cache it goes back to the ezwebin template even though i removed ezwebin from my AdditionalSiteDesignList[]? ???? Thx Lohan
|
Bertrand Dunogier
|
Thursday 15 April 2010 7:31:51 am
Lohan, it seems REALLY weird that the template is used, then no longer used once you've cleared the caches. Really :-) Enable debugging as explained in the topic Nicolas has linked, and come back with more debugging info, if you get some !
Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier
|
E AX
|
Thursday 15 April 2010 8:37:19 am
Bertrand, What debug info are you looking for? Thx
|