Archives
-
Dynamically switching the theme in Orchard
It may sound a little puzzling at first, but in
Orchard CMS, more than one theme can be active at any
given time. The reason for that is that we have an
extensibility point that allows a module (or a theme) to
participate in the choice of the theme to use, for each
request. The motivation for building the theme engine
this way was to enable developers to switch themes based
on arbitrary criteria, such as user preferences or the
user agent (if you want to serve a mobile theme for
phones for example). The choice is made between the
active themes, which is why there is a difference
between the default theme and the active themes.
-
The best way to learn how to extend Orchard
We do have
tutorials on the Orchard site, but we can't cover all topics, and recently I've
found myself more and more responding to
forum questions
by pointing people to an existing module that was
solving a similar problem to the one the question was
about.
-
Storing non-content data in Orchard
A CMS like
Orchard
is, by definition, designed to store content. What
differentiates content from other kinds of data is
rather subtle. The way I would describe it is by saying
that if you would put each instance of a kind of data on
its own web page, if it would make sense to add comments
to it, or tags, or ratings, then it is content and you
can
store it in Orchard using all the convenient
composition options that it offers. Otherwise, it probably isn't and you can store it
using somewhat simpler means that I will now describe.
-
Caching items in Orchard
Orchard has its own caching API that while built on
top of ASP.NET's caching feature adds a couple of
interesting twists.