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

eZ debug

Timing: Jan 19 2025 04:34:40
Script start
Timing: Jan 19 2025 04:34:40
Module start 'content'
Timing: Jan 19 2025 04:34:40
Module end 'content'
Timing: Jan 19 2025 04:34:40
Script end

Main resources:

Total runtime0.7247 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.9688180.8359
Module start 'content' 0.00570.6031 769.8047550.5391
Module end 'content' 0.60890.1157 1,320.3438337.0938
Script end 0.7246  1,657.4375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5787210.0002
Check MTime0.00150.2100210.0001
Mysql Total
Database connection0.00080.106510.0008
Mysqli_queries0.655190.40371940.0034
Looping result0.00180.24351920.0000
Template Total0.698696.420.3493
Template load0.00230.323820.0012
Template processing0.696396.083720.3481
Template load and register function0.00020.030810.0002
states
state_id_array0.00080.116210.0008
state_identifier_array0.00060.089020.0003
Override
Cache load0.00190.2686280.0001
Sytem overhead
Fetch class attribute can translate value0.00160.224730.0005
Fetch class attribute name0.00110.146440.0003
XML
Image XML parsing0.00100.136830.0003
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00190.2657270.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs