views:

161

answers:

3

Hi,

I'm after a bit of advice on how to handle a multi tenant site in ASP.NET from a UI perspective.

What I want to be able to offer is a choice of layouts to the client i.e.

Layout 1: Navigation horizontal at the top. Search results in a table in the middle. Some text at the bottom.

Layout 2: Navigation vertical on the left. Some text in the middle. Search results at the bottom

Layout 3, Layout 4, Layout x etc...

Each element within the various layouts can differ too. For example, the search results might look like simple list in Layout 1, but will have a completely different look in Layout 2.

Once a client has decided on Layout x, I then need to apply their company identity to the layout by changing the colours, logos, etc...

So, any suggestions on what approach to use would be greatly appreciated.

Many thanks,

ETFairfax

A: 

Create ASP.Net template pages with different layouts and use config files to vend the various layouts depending on client preference. Have a library showcase that you can show your present and prospective clients which lets them choose. Note that these templates can vend not only different markup but different stylesheets and even different client-side scripts.

Robusto
+2  A: 

I would probably do this by dynamically switching master pages depending upon the tenant. An example of how to do this is here.

E.g., within the action you can specify the master page:

view.MasterName = "MasterTwo";

Where possible (logos and colors), try to use style-sheets to control the look and feel, and reserve changes in the master page for actual functional differences.

RedFilter
+1 I was about to post the same link - Rob has a series going regarding multi-tenant setups/architectures. Very interesting.
Ahmad
+1  A: 

Assuming the document structure is consistent, you can dynamically deliver various stylesheets to reskin the site, based on which "tenant's" page is being requested.

Well written CSS can vary the layout of a well written document structure.

Dolph