Forums / Setup & design / Internet and Intranet site sharing the same data. Some questions

Internet and Intranet site sharing the same data. Some questions

Author Message

Lars Arne Brekken

Monday 07 July 2003 5:44:13 am

Hi!

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 ?

Thanks,
Lars

Tony Wood

Monday 07 July 2003 7:00:43 am

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

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Lars Arne Brekken

Monday 07 July 2003 7:20:12 am

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?

Bård Farstad

Monday 07 July 2003 7:30:26 am

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

--bård

Documentation: http://ez.no/doc

Lars Arne Brekken

Monday 07 July 2003 7:37:59 am

What about standard/override?

Karsten Jennissen

Monday 07 July 2003 7:50:18 am

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.

hth

Karsten

Bruce Morrison

Monday 07 July 2003 3:56:34 pm

Hi Lars

Like with most things associated with the web and ezpublish there are many ways to "skin the cat" :) 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

[DesignSettings]
# The standard design, is used as fallback design
# if the element is not in the sitedesign
StandardDesign=user
# The design of the site
SiteDesign=intranet
# 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.
AdditionalSiteDesignList[]=standard

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.

Cheers
Bruce
designIT

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Lars Arne Brekken

Tuesday 08 July 2003 12:16:44 am

Thanks, Bruce!

This is exactly what I was looking for.

Lars