|
Sometimes it can be essential to have different layout or even different overall look & feel for special pages in a website.
By default "My Web Pages Starter Kit" (MWPSK) Version 1.2.1 offers the ability to set a theme at website level. This theme will apply to all pages forming the website.
With the release of MWPSKex.#004 you will be able to set the desired theme at page level. If you wish to you could assign a different theme for every single page in your site. "Theme" in that context means layout and look & feel.
MWPSK Version 1.2.1 ships with 16 different themes out of the box. You will be able to choose from them instantly. If you have developed your own themes you will also be able to select one of those for your page(s).
Take a look at the new MWPSKex Demo page. For that page I changed the default "SwishBlue" theme to "SwishViolet". You will notice the difference ;)
You can download the whole project from my download page and use it as it comes with all the other extensions. Alternatively you can just have a look at the files that had to be modified and update your running site. Take care though if you opt to do so: you should really compare my files to yours with a tool like WinMerge (see links page). There are some other modifications in those files due to older extensions I decided to include. And of course: Always have a backup at hand prior to making any changes ;)
These files have been modified:
- ~/App_Code/Controls/PageBaseClass.cs
- ~/App_Code/Controls/TemplatedContent.cs
- ~/App_Code/WebPage.cs
- ~/Administration/Navigation.aspx
- ~/Administration/Navigation.aspx.cs
Additionally in file ~/App_GlobalResources/StringsRes.resx take care to add these new entries:
- MWPSKex_adm_Navigation_CurrentPageTheme
(fieldlabel to display currently selected page theme)
- MWPSKex_adm_Navigation_ResetPageTheme
(caption for reset button)
Hope you have fun with that extension! Feel free to let me know how it works for you.
What will be up next? ... Some time ago Rickard Magnusson offered an extension he called "PageThemeAdmin". At first look it seems this is much the same like my "PageTheme Selector". But there are some differences. Rickard would not change the default theme that would have been selected at website level. Instead he opted to change the underlying master file and thereby applying different SkinIDs. I like this approach too for this reason: It allows you to stay with the default theme of the website which certainly has a certain look & feel. All the CSS resources and images get served from the same set of files. No need to duplicate them. In one of the next releases of MWPSKex I will take care of something that will be based upon his PageThemeAdmin extension.
|