layout.ini SiteDesign attribute

Author Message

David Eriksson

Tuesday 21 June 2005 2:27:28 am

Hi

I'm trying to setup three different "sites" on eZpublish, using the same basic content and database, but different layouts and different parts of the data used and displayed on each site. The sites will be accessed by their own domain names, pointed to the proper URLs.

Today I discovered the beauty of layout.ini and the functionality it gives that seems perfect for my needs. I can get PageLayout to work perfectly, but according to the comments in settings/layout.ini, SiteDesign should also be possible to set like for each layout, and while I believe I could do everything I need with only a new pagelayout (including different css etc), it would be a nicer solution to keep the designs separate. I haven't been able to find any documentation on this though, thus this post.

I created my new directory in design/, let's call it xyz, and added

[xyz]
SiteDesign=xyz

to layout.ini.append.php in settings/siteaccess/defaultlayout/. But it doesn't seem to work. Should I put it in override instead? Do I need to create an xyz directory in settings/siteaccess/ as well? I want it to share the settings with defaultlayout, and that is also, from what I have understood, how it should work.

I'm going to keep experimenting, but if anyone has any experience of this and knows what's missing, I'd be delighted.

EDIT: I decided that since I was using different domains anyhow, I just added the other two sites like I did with the first one. Probably something like that I was supposed to do anyhow.

/David

Daniel Beyer

Tuesday 21 June 2005 6:50:56 am

Hi David,

if you want to have different designs for different siteaccess you need to add something like this to "/settings/siteaccess/YOURSITEACCESS/site.ini"

[DesignSettings]
SiteDesign=grayscale
AdditionalSiteDesignList[]=fancyblue
AdditionalSiteDesignList[]=base

"SiteDesign=grayscale" means, that you want to use the design placed in "/design/grayscale". Very cool with eZ publish is, that you can define other design. that should be used, too. In my example I use two other designs "fancyblue" and "base".

This means:
eZ publish will first look in "/design/grayscale" for the requested "template, image, stylesheet, ... ". If it is not, it will look in "/design/fancyblue" and then in "/design/base". If the requested "template, image, stylesheet, ..." can't be found is those design, than eZ publish will fallback to the design defined in "site.ini" section "[DesignSettings]" in setting "StandardDesign", which normaly is "standard". That means, that eZ publish finally looks for the "template, image, stylesheet, ..." in "/design/standard".

In my example you probably will get a grey design with a touch of blue ;)

Don't forget not to override the things in "/settings/override/" if you want to have them different for each siteaccess. Otherwise the settings in "/settings/override/" will be used, because the hierarchy, how eZp includes settings is this (if you don't use extensions):
1. /settings
2. /settings/siteaccess
3. /settings/override

Daniel Beyer
_________________________________
YMC AG
Kreuzlingen, Switzerland
web: www.ymc.ch
____________________________________

David Eriksson

Wednesday 22 June 2005 3:49:22 am

Yes, thank you, that's how I ended up solving it.

My original question was regarding use of SiteDesign in layout.ini. The comments in the file claims it should work, but all documentation I've seen only covers the PageLayout attribute, making me suspect SiteDesign in that file is either new, or totally unused.

Still, thanks for the reply. :)

/David

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 19 2025 07:05:45
Script start
Timing: Jan 19 2025 07:05:45
Module start 'layout'
Timing: Jan 19 2025 07:05:45
Module start 'content'
Timing: Jan 19 2025 07:05:46
Module end 'content'
Timing: Jan 19 2025 07:05:46
Script end

Main resources:

Total runtime1.3914 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 589.1563152.6250
Module start 'layout' 0.00810.0034 741.781339.4609
Module start 'content' 0.01151.3780 781.2422545.4609
Module end 'content' 1.38950.0018 1,326.703112.4766
Script end 1.3913  1,339.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.2733160.0002
Check MTime0.00150.1095160.0001
Mysql Total
Database connection0.00160.111910.0016
Mysqli_queries1.331095.6631570.0234
Looping result0.00070.0470550.0000
Template Total1.346196.720.6730
Template load0.00230.162420.0011
Template processing1.343896.578520.6719
Template load and register function0.00020.016610.0002
states
state_id_array0.00170.118910.0017
state_identifier_array0.00370.262520.0018
Override
Cache load0.00190.1394280.0001
Sytem overhead
Fetch class attribute can translate value0.00070.047720.0003
Fetch class attribute name0.00180.130740.0005
XML
Image XML parsing0.00080.056220.0004
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00200.1419160.0001
String conversion0.00000.000740.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
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs