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

eZ debug

Timing: Jan 18 2025 10:59:52
Script start
Timing: Jan 18 2025 10:59:52
Module start 'content'
Timing: Jan 18 2025 10:59:53
Module end 'content'
Timing: Jan 18 2025 10:59:53
Script end

Main resources:

Total runtime0.8499 sec
Peak memory usage4,096.0000 KB
Database Queries215

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.9844180.7969
Module start 'content' 0.00590.6750 768.7813723.7266
Module end 'content' 0.68090.1689 1,492.5078341.0547
Script end 0.8498  1,833.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.5257210.0002
Check MTime0.00170.1960210.0001
Mysql Total
Database connection0.00070.076510.0007
Mysqli_queries0.753488.65122150.0035
Looping result0.00250.29212130.0000
Template Total0.821496.720.4107
Template load0.00230.275820.0012
Template processing0.819196.378520.4095
Template load and register function0.00090.105010.0009
states
state_id_array0.00070.081910.0007
state_identifier_array0.00080.091820.0004
Override
Cache load0.00210.2500710.0000
Sytem overhead
Fetch class attribute can translate value0.00220.256860.0004
Fetch class attribute name0.00120.1354110.0001
XML
Image XML parsing0.00200.240060.0003
class_abstraction
Instantiating content class attribute0.00000.0019110.0000
General
dbfile0.00690.8131400.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs