Blog

Even better theming for DotNest sites

After some other recent improvements theming a DotNest site is now even closer to writing standard Orchard themes: with some complicated fixes around how URLs are handled (you don't want to know details, trust me!) writing a Media Theme is now a lot better experience. Templates and URL helpers in them will behave like you're used to, not to mention they will work in the same way locally during development as on DotNest. So go on and write a theme for that DotNest site of yours!

Theming a DotNest site just got better

As you surely know you have complete control over theming your DotNest site, including using custom templates written in the Liquid language. The latter got some important updates now: If you have errors in your template then it will be shown in place of the template and also logged with the Reports feature (which entries you can view from your site's admin). No more ugly generic error pages, you'll know in an instant if something went wrong with the template. You can now select if a template is rendered on the frontend, the admin or both. Media Themes that you can deploy from source control will behave like a standard theme and thus their templates will be only active for the frontend. Before this they were also displayed on the admin which caused quite some confusion. So do some theming!

Custom templating now available!

Until now you could only theme your DotNest site by using stylesheets. But now these dark days are over! We present you the power of Liquid Markup templates! What is Liquid? Liquid Markup is a templating language specifically developed for being able to write safe templates. It's "safe" because you can't just write arbitrary C# code, thus potentially endangering other tenants. But you wouldn't want to do that anyway, right? By making the Orchard Liquid Markup module available for all DotNest sites as of today you get an option to write templates from the admin site using Liquid, through the built-in Templates modules. These templates are then used just as normal shape templates. And not only this but you can add templates to your Media Theme (just files with the .liquid file format) and when the theme is deployed the templates will be deployed as well! There are constraints on what you can achieve from Liquid templates of course but it should be more than sufficient for theming your site. Also you have the power of Orchard shape composition at your hand too: go and read the readme on what power you can unlock! Also since the module was demoed on the weekly Orchard meeting you can watch iT in action in the recorded video (from 41:47). Oh, and by the way we also updated Orchard to the latest 1.8.x version so your site is now living on the bleeding edge! (Don't worry, we tested everything thoroughly.) Let's go and theme the heck out of that site of yours!