Portal Engine
Version 3.x > Portal Engine > Master Page, CSS overwrites with each new site View modes: 
User avatar
Member
Member
jwhelan-jcwhelan - 1/17/2009 12:17:32 AM
   
Master Page, CSS overwrites with each new site
We are new to Kentico and need some procedure for adding additional sites to an existing database, we have one server, one database (preferred).

This question pertains to the Portal Engine.

Here is our current procedures:

1.
We use the Kentico Windows installer to install the files to a new website directory. Once we have added these files and configured the IWAM read/write permiissions open the site with a browser.

2. We do not use the "Virtual Folder", we install new files to each new domain web folder.

3. We DO NOT check any box to overwrite existing users, pages, template and so forth.

4. We use the web interface through the domain to connect the website to the database, and choose the portal engine corporate site template. We then watch the system generate the script for the new Corporate site.

Issue:
Almost EVERY time we add a new website our existing websites lose the Masterpage information. I believe the new site copies over the master page template and we have to re-format all of our previous master pages (and other pages, and CSS sheets).

We use the wizard to install the corporate site.

What are we doing wrong? There were a few installations where things did not go wrong, but I must be missing a step and could use your help.

Thank you in advance.

James


User avatar
Member
Member
Elijah - 1/24/2009 9:30:15 AM
   
RE:Master Page, CSS overwrites with each new site

First, I would recommend a different configuration. Since you're using the same database for each site, but different file roots, that seems to me like it could cause some interesting problems regarding the CMS itself (expecting to find files it has referenced in the database, but depending on the site that's running, it is a completely different set of files).

Kentico supports multiple sites with a single installation. Since you're using one database, that's what I'd do.

To do this, you can set up multiple sites in IIS, but point them each at the same file root. You can still change your IIS settings individually per site (for error pages and so forth).

By the time Kentico receives the request for a web page, it will look at the hostname requested and start the appropriate site.

As far as the import, you need to make sure you uncheck the appropriate items during import that you don't want to be overwritten. Unfortunately, you can't select each individual page, but you can choose whether or not to import documents (all or none), templates, layouts, css style sheets, etc. Anything that remains checked will get overwritten.

I will admit though, creating a new site is a bit of a tricky process when you have a site already in the same database. I'd rather see a "new EMPTY site" option so my existing css/templates/web part containers/etc. don't have a chance to get overwritten, AND those preset items don't get imported either.

I've mentioned this to Kentico and they did say they're considering including an "empty" template in a future version.

Hope this helps,
Elijah

User avatar
Kentico Developer
Kentico Developer
kentico_zbysekn - 1/26/2009 4:11:09 AM
   
RE:Master Page, CSS overwrites with each new site
Hello,
I will agree with Elijah, if you want to have multiple sites in one database, it's preferred to use only one instance of Kentico CMS with multiple sites in it.

In your case it seems that you use default name of your masterpage template, which is overwritten during the creating of new corporate site. You can solve it by creating copy of masterpage template with different name for your existing sites and change it appropriately in your sites or simply uncheck importing of page templates during creating of your new site.

Best Regards,
Zbysek Nemec

User avatar
Member
Member
jwhelan-jcwhelan - 1/26/2009 6:53:41 AM
   
RE:Master Page, CSS overwrites with each new site
Zbysek, you are right. Each time we added a new system and began to edit our master page and sub pages we did not realise that design changes we made on one site affected the other sites because they all where using the same templates.

We began to do exactly as you have suggested, as each new site is created we save the master pages, and sub pages as copies. This solved most of our problems.

I refuse to create new databases for each new website. We are primarily an SEO company and I see this product as a one stop shopping for checking on new pages created by our clients that we must optimize titles, and meta information for.

My worry is that when our clients add new pages that are from the original templates (not copies) that they will be modifying the master templates. Is there anything we can do to prevent them from affecting all templates on the database? Is there a user role that prevents non-global administers from choosing unapproved templates?

I hope this make sense, and I thank you both for your response to my issues here.

We are learning, but we are loving this software

James

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/27/2009 2:35:46 AM
   
RE:Master Page, CSS overwrites with each new site
Hi,

You will need to ensure this behavior by your own customization using our API. The CMS is not designed for fully separate sites. It is designed for one owner (or administrator) of multiple sites, so they know what is shared and what to changed. It is not really aimed e.g. for web hosting. You need to customize it for this usage. Moreover, the single database in this case is really a big risk.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
mcutter-global-id-group - 1/26/2009 9:31:07 AM
   
RE:Master Page, CSS overwrites with each new site
You are correct. We trashed existing sites 3-4 times before we figured out what was going on.
Kentico export/import when you have multiple sites using the same DB is very fragile and imo poorly designed.
Check out my post that outlines the process we came up with to work around. Search for Global Template Gochas or this link
http://devnet.kentico.com/Special-Pages/Forums-Search-Results.aspx?SearchForum=Global%20Template%20Gochas
Also beware that versions only apply to content and not CSS or template-level changes.
Good luck.