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

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 30 2025 22:23:33
Script start
Timing: Jan 30 2025 22:23:33
Module start 'layout'
Timing: Jan 30 2025 22:23:33
Module start 'content'
Timing: Jan 30 2025 22:23:33
Module end 'content'
Timing: Jan 30 2025 22:23:33
Script end

Main resources:

Total runtime0.0239 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.0078151.1953
Module start 'layout' 0.00530.0040 739.2031220.6719
Module start 'content' 0.00930.0133 959.8750997.8828
Module end 'content' 0.02250.0013 1,957.757833.9922
Script end 0.0238  1,991.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.7708140.0002
Check MTime0.00104.0920140.0001
Mysql Total
Database connection0.00062.438010.0006
Mysqli_queries0.002410.205430.0008
Looping result0.00000.049910.0000
Template Total0.00104.010.0010
Template load0.00073.100210.0007
Template processing0.00020.896910.0002
Override
Cache load0.00052.124410.0005
General
dbfile0.002510.571080.0003
String conversion0.00000.035040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs