This project is read-only.

Default Theme Architecture

Topics: Business Logic Layer, Themes
Dec 5, 2011 at 3:09 PM

When making JQ Mobile theme for the theme contest, I ran into some situations making a mobile theme that I haven't really encountered before while making a regular theme for I wanted to make the client code as clean as possible and not include any of the javascript or css that comes with BlogBasePage since I wasn't going to need it and also change a lot of the html output that is generated by BlogBasePage, default.aspx, page.aspx, post.aspx, archive.aspx, search.aspx.

I used a ThemeHelper from (website seems to be offline now) and some other logic in JQ Mobile's site.master to override the routing to all the aspx pages. What I would like to see done in is have a Default theme with all the aspx pages and if a theme has any of those aspx pages in their theme to use that one instead of the default page.

I've made applications in MVC and made a custom ViewEngine to create something similiar to what I've decscribed....kinda like this:

I think to make more successful for designers to make great themes. I know it will take alot of re-architecture of BlogBasePage and other areas of BlogEngine for themes to be more flexible and not be forced into the html output that BlogEngine currently creates. Since is now on 4.0, I don't think it will be too hard to make something like this since you have routing RouteCollection and check if a page exists in the current theme.

So File/Folder structure something like this:

  • themes
    • Default
      • archive.aspx
      • contact.aspx
      • error.aspx
      • error404.aspx
      • page.aspx
      • post.aspx
      • search.aspx
      • style.css
      • theme.png
      • theme.xml
    • Theme1
      • archive.aspx
      • CommentView.acsx
      • newsletter.html
      • PostView.ascx
      • post.aspx
      • site.master
      • theme.png
      • theme.xml



Just some food for thought,


Dec 5, 2011 at 3:54 PM

I was approaching it from the opposite direction. Say you create "empty" folder in "themes" and set it as your new theme. Then go to the blog and see empty page, because you have not implemented any templates yet. Then you start adding "postlist", "postview", "page" etc. Not sure which way I would prefer it to work, something to think about, may be I'll try default theme too for comparison.