Dave Burke : Online Community and Social Business Specialist

Free at Last! The End of the Sueetie Shared Master Page Model

I'm putting a lot of effort in Gummy Bear 1.3 to make the creation of Community Themes and Theme Packs much, much easier. Something’s wrong when you can setup an Online Community as rich in features as Sueetie in 15 minutes, but then must invest a week theming the thing. With Gummy Bear 1.3, the plan is to quickly setup an online community like always, but then be able to chose from a ton of Theme Packs to be up and running in production quickly.

One of the things holding back the Theme Dream was the shared Master Page model, where Web Designers had to use an existing master page, or swap out a designated master page for their own. That dog just don’t hunt, so now all applications support independent, theme-specific Master Pages.  What’s more, all non-application pages (home page, search, login, etc.) support dynamic Master Page assignment.  Web Designers are no longer restricted to using either a shared Sueetie.Master or Alternate.Master page, but any darn master page they please.

Boiling it down, no more shared master pages in Sueetie, anywhere, in any application, at any time. I hope to demonstrate in action why this is big news, but in the meantime here is a copy of the new Master Page Flexibility in Sueetie wiki page on the master details.

________________


Theming Freedom

Adding support for theme-based and dynamically-assigned Master pages enables Web Designers to create Sueetie Community themes with complete freedom, as the earlier shared Master Page model is no more. All master pages are located in their application-specific location, distinct from the master pages of other themes. In some cases, not sharing is good. heh.

 

The Olden Days of the Shared Master Page Model and Today


Root Web Area

With the shared master page model the root web area - that is, website content not in one of the community applications - we assigned either sueetie.master or alternate.master as the page's master page. These files were shared by all themes and located in a common /masters folder. Master assignment of custom pages is now dynamic and each theme's master files are stored separately in /masters/THEME.

Blogs

Sueetie adheres to BlogEngine.NET's native theming model where each Site.Master page is located in its /blog/themes/THEME folder. No change here.

Forum

In the shared master page model, a single Forum.Master page was located in the forum application root directory for all themes to share or overwrite, whatever their pleasure. Now each theme's Forum.Master page is located in its /forum/masters/THEME folder.

Media Gallery

Similar to the forums shared master page logic, a single Media.Master page was located in the Gallery Server Pro application root for all themes to share. Each theme Media.Master page is now located in /media/masters/THEME.

Wiki

ScrewTurn Wiki uses two master pages: MasterPage.master and MasterPageSA.master (SA - standalone) in the application root. Substantial logic and relative pathing made the /wiki/masters/THEME approach problematic, so Sueetie supports multiple ScrewTurn master pages by theme name in the Wiki Application root, deriving from MasterPage.master.cs and MasterPageSA.master.cs respectively. For instance, for a theme named "ROCKET" these master page names would be Rocket.master and RocketSA.master.

Administration Area

In the past all Sueetie Administration pages were hard-coded to use the original Lollipop theme. The Administration area theme is now easily changed by updating the Core AdminTheme property in the /Sueetie.config file.

An Example of Dynamic Master Page Assignment

Dynamic Master Page assignment is particularly useful for custom applications that are outside of one of the Community Applications. To assign a master page on-the-fly on a custom non-application page, inherit from the SueetieBaseThemedPage instead of SueetieBasePage. Below is what the SueetieBaseThemedPage looks like.

Image

Then in the web page constructor specify the Master Page you wish to use for the SueetieMasterPage property. If no SueetieMasterPage is assigned, the default master page /masters/THEME/sueetie.master is used. Below demonstrates how the login page now loads the alternate.master page whereas in the past it was hard-coded in the .ASPX Page directive. Remember that Sueetie uses a Website Project model, so the Constructor() codebehind can be changed in notepad if you want to use a master page other than alternate.master.

Image

Comments (0) | Post RSS RSS comment feed

Posted on 5/3/2010 3:09:09 PM by Dave Burke
Categories: Sueetie
Tags: |

Related posts

Pingbacks and trackbacks (1)+


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke

Copyright © 2013 Dave Burke.  All Rights reserved.