Sueetie Theme Changer Now Supports Multiple Blogs

One of my favorite features in Sueetie is being able to enter a new theme name on the Administration Theme Update form, click “Update” and observe the theme of 6 separate applications change instantly.  There’s a lot behind the scenes to make that happen, of course, but I still like clicking on that button.

There was a limitation with the theme changer in that it only supported a single blog, with the application key, i.e. location, hard-coded as “blog.” I don’t know how that got in there, but I did write that code a long time ago. Regardless, the “blog” restriction is no longer the case.  The site blog can have any application key. The big news, however, is that for sites with multiple blogs (like, all blog themes will be updated by the Sueetie Theme Changer.  That’s cool.

While I was at it I noticed a hard-coded “wiki” requirement for updating the site wiki theme.  That application key requirement also no longer exists.

Going geek on you, what was wild about enabling multiple blog theme updates was that only 3 lines of code were required.  Simple is our motto.  Sueetie Simple.  Using the SueetieApplication model we were able to do a simple foreach() to perform an operation the blog applications.

foreach (SueetieApplication _app in SueetieApplications.Get().All)
    if (_app.ApplicationTypeID == (int)SueetieApplicationType.Blog)
      SueetieBlogUtils.UpdateBlogTheme(_sueetieApplication.ApplicationKey, _theme);

I mentioned in another post today that I was "closing in on V3.1." Consider this one less thing.

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.