Non-standard Theme implementation

Topics: Themes
May 2, 2007 at 5:47 PM
After a day or two of playing with this blog package (including converting it to a Web Application Project), I'm very impressed.

However, I'm concerned about the non-standard theme implementation (i.e. not using the App_Theme directory, and including master and control files in the custom theme directory)

What are you doing that can't be accomplished with standard skin files in the App_Themes directory? (besides including master and control files, of course)

Jun 28, 2007 at 4:58 PM
I guess that's one way to go (App_Theme directory), but I never really liked it.
Jun 28, 2007 at 8:59 PM
I wasn't part of the team when this was decided and I've never discussed it with Mads, but I'd guess the master page file is the main reason we don't use App_Themes. It is ideal to be able to keep all the theme files together in a single folder so that someone can just drop a theme in quickly and use them right away.

I'll admit when I first downloaded the project and noticed the Themes were not in App_Theme I thought it odd. Once I realized the page issue however, I was fine with it and actually prefer it.

Mads is on vacation, but I'll try to remember to ask him when he gets back. I wonder if there was anything else I'm missing. :)
Jul 5, 2007 at 9:13 PM
I know this is an old post, but what was the conclusion?

I have an existing site that I would like to use BlogEngine.NET on but it uses "normal" Themes. I've only just started looking at this but how difficult is it going to be for me to add BlogEngien.NET to my site and swap out the Theme stuff for App_Themes?

Other than that, this looks awsome.
Jul 9, 2007 at 9:37 PM
The reason is quite simple actually. You cannot put .master files in the App_Themes folder. It only accepts stylesheets, images and .skin files. Besides the skin files doesn't let you skin an application, only individual controls.
Jul 10, 2007 at 1:36 PM
Then why not ship, as part of a new skin, a new .master file and a new App_Them theme? Both can be set from web.config.

Actually, I'm not really questioning this implementation. I'm sure its great and it seems to work fine. Its just a hassle now to undo it to use BlogEngine an a different app that uses the standard implementation of Themes and Master Pages.
Jul 11, 2007 at 12:45 PM
Bump, I'd love to be able to easily intergrate this BlogEngine into an existing site - but using the sites existing .theme file.
Jul 13, 2007 at 1:45 PM
You will encounter errors using the App_Themes approach in regards to url rewriting, you can overcome these by writing custom control adapters and .browser files but that is more work than using the themes approach supplied in BlogEngine.

What happens is .NET will translate your paths before the url is re-written so if you redirect to sub directories or from sub directories .NET will throw exceptions when attempting to apply the themes. This is a limitation with .NET and url rewriting period, not just with BlogEngine, UrlRewriter will cause the same issues.

To overcome it you would have to write control adapters that could re-render all of your paths to stylesheets and themes which could become quite a pain.
Jul 13, 2007 at 3:16 PM
Thanks, calbert.

Not to appear stupid, but why is blogengine doing the url re-write? Is it just something someone thought was cool or is there something intrisic to bloging that requires it?

Sorry if this is obvious to others, but I don't really know much about the technical details of how a blog and and RSS feed are supposed to work.

Thanks for the info!
Jul 13, 2007 at 4:05 PM
ormico, the reason why BlogEngine does url rewriting is quite simple. It looks better, is more user friendly and you get better search engine ranking in some cases. Most dynamic websites does it and certainly all blog platforms. Consider these two url's. The point to the same page

I know which one I'd prefer.
Oct 6, 2007 at 9:00 PM
Hi, is there a reason why you don't use the standard .skin files to skin controls also? I haven't investigated this further so there probably is! =)