Forums / Setup & design / layout.ini SiteDesign attribute

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