ezpublish 4 : create 2 websites

Author Message

sergio da silva

Friday 05 September 2008 7:46:05 am

Hello,

I would like to have 2 websites in only one ezpublish, each one using a different database. But the second one(who use the second database) should extract some data from the first database using by the other website (like an list of article)

Is it possible using 2 siteaccess ?? and if it's possible, how to do it?

Another way, can i create 2 website with only one siteaccess:


                                                parent_node
                                                |           |
                                             site 1        site 2
                                              |    |         |    |
                                               ...          ...

Thanks for the help !!

Greg McAvoy-Jensen

Friday 05 September 2008 9:57:16 am

You can create two siteaccesses, each with a different index page--which can be under a top level node (2) in the node tree. This would be done with the sites sharing one database (and the same var directory). In this case, in each site access, edit site.ini.append.php:

[SiteSettings]
SiteName=Whatever
SiteURL=whatever.com
IndexPage=/content/view/full/388 # use the new root node for this siteaccess
DefaultPage=/content/view/full/388 # use the new root node for this siteaccess
RootNodeDepth=2

This will get you started. More needs to be done if you're using ezwebin, if you want searches and sitemaps to only show the respective sites, etc.

There's also this related post: http://ez.no/developer/forum/setup_design/valentin_s_multisite_guide_v_1_example_uses_ezp_v_3_9_4
.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Mark Marsiglio

Tuesday 16 September 2008 9:46:37 am

You will likely want to look at the PathPrefix functionality in the docs as well, as it will enable you to skip a level on the URL for your sites so that they will appear to be at the root level. this setting goes in the site.ini.append.php for each siteaccess.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

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 31 2025 03:40:07
Script start
Timing: Jan 31 2025 03:40:07
Module start 'layout'
Timing: Jan 31 2025 03:40:07
Module start 'content'
Timing: Jan 31 2025 03:40:07
Module end 'content'
Timing: Jan 31 2025 03:40:07
Script end

Main resources:

Total runtime0.0250 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2500151.2266
Module start 'layout' 0.00530.0042 739.4766220.7188
Module start 'content' 0.00950.0139 960.19531,001.9609
Module end 'content' 0.02340.0015 1,962.156333.9922
Script end 0.0249  1,996.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.3587140.0002
Check MTime0.00104.0010140.0001
Mysql Total
Database connection0.00072.845010.0007
Mysqli_queries0.002911.505130.0010
Looping result0.00000.051510.0000
Template Total0.00124.710.0012
Template load0.00093.548010.0009
Template processing0.00031.108310.0003
Override
Cache load0.00062.236510.0006
General
dbfile0.00166.215680.0002
String conversion0.00000.026740.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