views:

757

answers:

5

There are plenty of ways to provide a dynamic style/theme for a web site, but I am looking for some help on some best practices or techniques that have worked well for others.

I am creating a web site that needs to provide the ability for customers to create or specify their own colors, style, theme, or layout. I'm not convinced how much flexibility I need yet, but basically I need to provide Branding capabilities.

I will be using ASP.NET, and am open to any ideas that will fit within the ASP.NET framework.

+1  A: 

Using Themes for ASP.NET 2 and greater will provide you everything you need for this.

Stephen Wrighton
A: 

Best way to handle it would be to make a nice CSS document that will specify all the areas that you would like to offer customization, such as header background image, background and text colors, etc. Then build application code to allow specification of which theme to load, and bring up that CSS file.

A: 

I'd personally go for a CSS-based solution.

You could define the elements' IDs and CSS classes for each page in the web application, so that customers can provide their own set of CSS files.

This approach is platform-agnostic, so that the developer who creates the custom themes is not forced to fit into the ASP.NET themes model - she might as well be a web designer with no programming knowledge.

Dario Solera
Always use .css files for maintainability. Look at Subtext. Create your own theme folder and .css files and carry on.
CoffeeAddict
A: 

Themes might be a good solution but having re-read your question I think you might be asking for a method for allowing customers to submit their own branding dynamically, i.e. without you having to modify any files, a hands-off approach? How about having an admin interface consisting of web forms where the customer can upload images and CSS themselves? You could then retrieve that content using a HttpHandler or similar.

tjrobinson
A: 

See this thread -> http://stackoverflow.com/questions/178863/change-theme-css-based-on-user