eZ Community » Learn » eZ Publish » Lots of Websites, One eZ Publish...

Lots of Websites, One eZ Publish Installation - Adding Siteaccesses in eZ Publish

Thursday 27 May 2010 5:36:44 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Additional Considerations

Site Map and Tag Cloud

You can also then have each siteaccess produce a sitemap of only its own site. Edit the template showing the series of links at the top-right corner of the page to make sure the generated links take the new content root into account. It is called page_header_links.tpl in the 'ezwebin' design.
The generated sitemap URLs will say something like :

http://www.example.com/index.php/public/content/view/sitemap/175 (or 176 for the other siteaccess)
If you have a Google sitemap or Google news sitemap generator, make the appropriate adjustment there as well.

Update sitemap and tagcloud templates

Update sitemap and tagcloud templates

 

Site Settings

If you are making use of the “site settings” feature (which may be accessed on the public site by a link near “registration” and “login”, or in the administration interface's Design/Look and Feel), it will work well for websites which are multiple translations of the same data. This feature is useful for demo's and small sites. However, it will not work by default for different websites with different data (whether using multiple databases or different subtrees of the same content tree). In this case, it is generally best to modify the templates which use this data to draw it from a content nodes you specify for each site separately.

Quality Assurance

This how-to was certainly not exhaustive. Your own site may have other features which get broken by trying to switch from one root node to two landing page nodes beneath a folder. The example code above should give good hints as to how to fix your custom template code.

Design Extension Override Rules

Your next step might be to create a custom design for each site by modifying the DesignSettings block in settings/siteaccess/<siteaccess-name>/site.ini.append.php. Note that if you keep your design settings in an extension, you'll have to list that extension in settings/override/site.ini.append.php; it's not enough to simply list it as an ActiveAccessExtension in settings/siteaccess/<siteaccess-name>/site.ini.append.php. The ActiveAccessExtension setting is useful because it exposes only the necessary URL's and API's. It allows each site to use a different design extension. Alternately, siteaccesses could share one common design extension, and each have their own specific design extension cascading over the common design extension.

Putting this all together, if we created a “publicdesign” design in a “publicdesign” extension, and a “newsitedesign” in a “newsitedesign” extnesion, and also an “ourshareddesign” in an “ourshareddesign” extension, we could see some example ini settings. For the “public” siteaccess this would look like:

[ExtensionSettings]
ActiveAccessExtensions[]=publicdesign
ActiveAccessExtensions[]=ourshareddesign
 
[DesignSettings]
SiteDesign=publicdesign
AdditionalDesignList[]=ourshareddesign
AdditionalDesignList[]=ezwebin
AdditionalDesignList[]=base
AdditionalDesignList[]=standard

On “new_site” we would do this:

[ExtensionSettings]
ActiveAccessExtensions[]=newsitedesign
ActiveAccessExtensions[]=ourshareddesign
 
[DesignSettings]
SiteDesign=newsitedesign
AdditionalDesignList[]=ourshareddesign
AdditionalDesignList[]=ezwebin
AdditionalDesignList[]=base
AdditionalDesignList[]=standard
 

Printable

Printer Friendly version of the full article on one page with plain styles

Author(s)

Proudly Developed with from