ezwebin: Multiple domains and different designs for each

Author Message

Henrik Farre

Thursday 27 September 2007 7:53:50 am

Hi

I'm developing a site for a client, and the site uses the ezwebin extension.

I have followed the instructions from http://ezpedia.org/wiki/en/ez/overriding_the_ez_web_interface_ezwebin_with_custom_designs to create a new design for the ezwebin extension.

Now I've run into trouble: The site needs 3 new "sub sites", i.e. 3 different domains and 3 different designs.

My initial idea was to create 3 new copies of the extension, create 3 new siteaccess', each pointing to different RelatedSiteAccessList, SiteDesign and so forth...

I added each of the copies to ExtensionSettings in settings/override/site.ini.append.php . But the last line before ActiveExtensions[]=ezwebin always overrides the other ones.

How do I go about using the ezwebin extension with 3 different designs, one for each domain?

Bellcom Open Source < http://www.bellcom.dk >, Tel: +45 70 26 00 85
eZ Publish, Drupal, SugarCRM

Valentin Svelland

Sunday 06 January 2008 2:12:28 pm

Hi, did you find a solution to this problem Henrik?

I was thinking of rewriting line 27 of pagelayout.tpl in the original ezwebin-extension to fetch the desired template look object based on siteaccess ($access_type.name). This could be done by altering the array number of $pagedesign_class.object_list[0]) but I guess this is no good solution as this in fact forces the same layout and css on every site. Only logo and other paramteres of template look class would separate the pages..

It's really weird that eZ 3.9.4 does not support different design extensions to be linked to different sites based on siteaccesses.

Perhaps someone figured out an easy way out of this? Please reply! :)

------------------------
I made eZ run on www.eigersund.kommune.no, bjerkreim.kommune.no, lund.kommune.no and sokndal.kommune.no. Municipalities should use open source!

André R.

Sunday 06 January 2008 2:39:09 pm

>I added each of the copies to ExtensionSettings in settings/override/site.ini.append.php.
>But the last line before ActiveExtensions[]=ezwebin always overrides the other ones.

You shouldn't need to create a extension for each design, but it doen't really matter since the moste important part is that all the 3 designs have their own design name.

settings/siteaccess/page1/site.ini.append.php:

[DesignSettings]
SiteDesign=page1_design
AdditionalSiteDesignList[]
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=base

Extensions structure:

extension
| -ezwebin
| -design_extension
| | -- design
| | | --- page1_design
| | | | ---- images
| | | | ---- stylesheets
| | | | ---- templates
| | | --- page2_design
| | | | ---- images
| | | | ---- stylesheets
| | | | ---- templates
| | | --- page3_design 
| | | | ---- images
| | | | ---- stylesheets
| | | | ---- templates
| | -- settings

But there is another problem though, you need to override pagelayout to stop using the template_look / site settings class. Since it's far from multisite safe!

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Valentin Svelland

Sunday 06 January 2008 2:51:37 pm

Are you saying that inserting several subdirectories into "/extension/ezwebin/design/" in addition to "/extension/ezwebin/design/ezwebin" is possible?

For example:

/extension/ezwebin/design/ezwebin (org. folder)
/extension/ezwebin/design/design1 (new folder)
/extension/ezwebin/design/design2 (new folder)

If so, does these new folders need to contain all of the filestructure in /extension/ezwebin/design/ezwebin or is it possible to just insert the files which I want to override the standard settings?

------------------------
I made eZ run on www.eigersund.kommune.no, bjerkreim.kommune.no, lund.kommune.no and sokndal.kommune.no. Municipalities should use open source!

Valentin Svelland

Sunday 06 January 2008 3:09:57 pm

I'll answer that myself: yes you are saying just that!

I created a folder as you suggested and put one file inside its template-folder, namely pagelayout.tpl, and changed the template look object by changing the array-number mentioned in my earlier post of this thread..

Sweet Moses, this works! Hopefully css and layout will both play nice when overriding this way. I haven't tested much yet, but all this makes me wonder what's the use of this article anyway:

http://ezpedia.org/wiki/en/ez/overriding_the_ez_web_interface_ezwebin_with_custom_designs

------------------------
I made eZ run on www.eigersund.kommune.no, bjerkreim.kommune.no, lund.kommune.no and sokndal.kommune.no. Municipalities should use open source!

Henrik Farre

Monday 14 January 2008 2:57:41 am

Great! Now I only have to find the time to undo the mess I made :)

Bellcom Open Source < http://www.bellcom.dk >, Tel: +45 70 26 00 85
eZ Publish, Drupal, SugarCRM

Valentin Svelland

Monday 14 January 2008 6:28:26 am

No prob. You should also check out my new guide. After searching all over the forum for bits and pieces on how to do a multiple site installation I decided to write all my experiences in one place;

http://ez.no/developer/forum/setup_design/valentin_s_multisite_guide_v_1_example_uses_ezp_v_3_9_4

------------------------
I made eZ run on www.eigersund.kommune.no, bjerkreim.kommune.no, lund.kommune.no and sokndal.kommune.no. Municipalities should use open source!

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 18 2025 15:09:43
Script start
Timing: Jan 18 2025 15:09:43
Module start 'layout'
Timing: Jan 18 2025 15:09:43
Module start 'content'
Timing: Jan 18 2025 15:09:44
Module end 'content'
Timing: Jan 18 2025 15:09:44
Script end

Main resources:

Total runtime0.8700 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.2891152.6563
Module start 'layout' 0.00500.0026 741.945339.5078
Module start 'content' 0.00760.8613 781.4531634.3125
Module end 'content' 0.86890.0010 1,415.765620.0938
Script end 0.8699  1,435.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3583160.0002
Check MTime0.00130.1443160.0001
Mysql Total
Database connection0.00060.071110.0006
Mysqli_queries0.814193.5720710.0115
Looping result0.00050.0618690.0000
Template Total0.842596.820.4213
Template load0.00220.250920.0011
Template processing0.840496.594220.4202
Template load and register function0.00010.009910.0001
states
state_id_array0.00130.152910.0013
state_identifier_array0.00080.091920.0004
Override
Cache load0.00190.2214460.0000
Sytem overhead
Fetch class attribute can translate value0.00070.080830.0002
Fetch class attribute name0.00120.143190.0001
XML
Image XML parsing0.00120.137230.0004
class_abstraction
Instantiating content class attribute0.00000.0021120.0000
General
dbfile0.00090.1052230.0000
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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/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
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs