This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Setup & design » Internet and Intranet site sharing...

Internet and Intranet site sharing the same data. Some questions

Internet and Intranet site sharing the same data. Some questions

Monday 07 July 2003 2:44:13 pm - 7 replies


I'm creating an Internet site for my company. When it's done, I'll be creating our Intranet site, which will be almost identical to the external one. The difference will be that the menu will be slightly different, both internal and external news will be shown etc.

What I'm looking for is suggestions on how to do this as smoothly as possible. How can I share templates between the two sites? Would it be smart to put them in /design/standard ?


Monday 07 July 2003 4:00:43 pm

Hi Lars,

First, I would keep them on seperate machines if possible for security reasons.
If you are using Linux, i would use rsync to keep this internet version uptodate with code etc.
For database you could do a nightly update or the like to keep things synced...

You could keep exact copies of both files and of the database on the internet site. It just depends how sensitive the intranet data is.

I hope this helps


Monday 07 July 2003 4:20:12 pm

My biggest concern was not the security, but how to take advantage of the fact that the two websites are almost identical.

Maybe I can try to explain a little better:
Right now I have two site accesses; user and admin. For the Intranet, I was thinking about creating a third site access, "intranet". With user you don't have to log in, but with intranet you do.

user and intranet will share the same data.

The point is that user and intranet will look mostly the same. intranet gives access to more that user (e.g. internal news).

Is it a good idea to put the templates in the standard directory?

Modified on Monday 07 July 2003 4:21:33 pm by Lars Arne Brekken

Monday 07 July 2003 4:30:26 pm

Lars: never put the templates in the standard directories. Use your own. If not you will have problems with upgrades.


Monday 07 July 2003 4:37:59 pm

What about standard/override?

Monday 07 July 2003 4:50:18 pm

The idea is to create a new template directory for your site under /design, i.e. /design/yourdesign. You would set this directory in your /settings/siteaccess/yoursite/site.ini.append, i.e. link the logic site to the design directory.

Any template that is not found in the /design/yourdesign hierarchy is then fetched from /design/standard, so you only need to put the stuff that you want to change in /design/yourdesign. The override directory is for all the specific override of the generic templates, i.e. for one particular class, node, section, etc.



Tuesday 08 July 2003 12:56:34 am

Hi Lars

Like with most things associated with the web and ezpublish there are many ways to "skin the cat" happy.gif Emoticon Here are my suggestions.

I'm making the assumption that the intranet and internet sites are planned to be on the same server and utilise the same copy of ezpublish as well as the same database.

1. Create a new siteaccess for the intranet site.

You will end up with 3 site accesses
a. user
b. admin
c. intranet

2. Configure the intranet site access as required.

3. Create a new site design for the intranet

4. Configure the site access for the intranet to use the new intranet design with fall backs to the user and standard designs.

In the settings/siteaccess/intranet/site.ini

# The standard design, is used as fallback design
# if the element is not in the sitedesign
# The design of the site
# AdditionalSiteDesignArray contains an array
# of sitedesigns. These sitedesigns will be used
# if the design was not found in the main
# sitedesign. StandardDesign is the fallback design.

This is a new setting in 3.1. I'm making the assumption that this configuration will firstly try to find a template in the intranet design then user and lastly standard.

You can then make the changes required (i.e the menus) in the intranet design. The common parts of the site will be generated from the templates in the user and standard designs.

It would be a good idea to make the intranet templates check to see if the user is logged in before displaying the extra intranet options

Let us know how you went.


Tuesday 08 July 2003 9:16:44 am

Thanks, Bruce!

This is exactly what I was looking for.



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from