Forums / Setup & design / Design changes

Design changes

Author Message

Mihai007 Pop

Wednesday 15 February 2006 9:27:20 pm

Hi...

I have played with the new eZ 3.7.3 framework recently and I just fell in love with all it has to offer. I come from a background where I normally used eZPublish v2.x and am very familiar on how to modify that framework to cater all my needs.

I have also tried to learn all the things that are written in the documentation, but I would say that 60% of it I find explanatory, but the rest may be shortcoming in how it is explained to novices such as myself.

In eZPublish 2.x it was very simple to change the sitedesigns by setting up sections and assigning different sections to different categories. When I clicked on a different category, then the whole website look and feel would change completely. How do you do something similar in EZ v3.x ???

But I don't mean the styles that are found under the "design/look and feel" in the admin interface. This I found that it changes the ENTIRE website - not just the category I wish to have changed.

I mean something similar to "pagelayout" where I could control the classes and the modules I wish to show or not show.

laurent le cadet

Thursday 16 February 2006 6:55:17 am

Hi,

There is many different ways to customize your section design.

First of all create sections ;) (admin)and assign them to specific folders then declare them in override.ini.append.php :

[page_coeur]
Source=pagelayout.tpl
MatchFile=page_coeur.tpl
Subdir=templates
Match[section]=17

[page_sortir]
Source=pagelayout.tpl
MatchFile=page_sortir.tpl
Subdir=templates
Match[section]=18

...

1 template (pagelayout) for each section and now you can add the additionnal stylesheets you want.

Another lighter approch and maybe better (it depend on what you will want to do) is a switch/case based on your new section :

<style type="text/css">
{switch match=$DesignKeys:used.section}
		{case match=6}
			@import url({"stylesheets/maternelle.css"|ezdesign});
		{/case}
		{case match=7}
			@import url({"stylesheets/college.css"|ezdesign});
		{/case}
		{case match=8}
			@import url({"stylesheets/segpa.css"|ezdesign});
		{/case}
{/switch}
</style>

No need to create specific pagelayout. You can use the default one.

This are some basics but I'm nearly sure you can do what you want.

Hope this help.

Laurent

Christopher Grondahl

Saturday 04 March 2006 3:32:56 pm

good fix with the section-based approach. thanks.

Chris

ez site: http://www.acem.no

Every day is Groundhog Day