Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Content Tree Module, Orchard Core Admin UI experience renewal survey - This week in Orchard (06/06/2025)

This time, you can see a fascinating demo of the Content Tree Module! But first, let's look at our other topics, like adding GraphQL support for querying content items by status from the Content Picker Field, fixing binding form input in the Coming Soon theme, and improving the Register User Task. Don't forget to fill out our Orchard Core Admin UI experience renewal survey to help shape the future of Orchard Core!

Featured tags

IIS
API
SMS
SEO
MCP
All tags >

Writing an Orchard Owin middleware

So you heard about how fancy Owin is, with all of its loosely-coupled thingies? Well, it's now in Orchard: as you may have heard on this week's Community Meeting, you can now write Owin Middlewares in the Orchard-y way. Let's see how! We won't discuss how Owin works or what a middleware is, so if you don't know these yet, check out the linked meeting video. Also, make sure to grab the latest source from the 1.x branch of Orchard's repository because only the upcoming 1.9 version will have Owin support. First you'll need to get familiar with the IOwinMiddlewareProvider interface. Middleware providers are injected services that return a collection of OwinMiddlewareRegistration objects. The latter ones contain the actual middlewares, i.e. those delegates that will run when the Owin pipeline is executed. This all is where the magic happens: you need to implement IOwinMiddlewareProvider and inside your implementation create OwinMiddlewareRegistration instances. See the following example: public class OwinMiddleware : IOwinMiddlewareProvider { // Mostly you'll only need the WCA, see below why. private readonly IWorkContextAccessor _wca; // Or use Work<T> injections, also see below for the explanation. private readonly Work<ISiteService> _siteServiceWork; public ILogger Logger { get; set; } public OwinMiddleware( IWorkContextAccessor wca, Work<ISiteService> siteServiceWork) { _wca = wca; _siteServiceWork = siteServiceWork; Logger = NullLogger.Instance; } public IEnumerable<OwinMiddlewareRegistration> GetOwinMiddlewares() { return new[] { // Although we only construct a single OwinMiddlewareRegistration here, you could return multiple ones of course. new OwinMiddlewareRegistration { // The priority value decides the order of OwinMiddlewareRegistrations. I.e. "0" will run before "10", but registrations // without a priority value will run before the ones that have it set. // Note that this priority notation is the same as the one for shape placement (so you can e.g. use ":before"). Priority = "50", // This is the delegate that sets up middlewares. Configure = app => // This delegate is the actual middleware. // Make sure to add using Owin; otherwise you won't get why the following line won't compile. // The context is the Owin context, something similar to HttpContext; the next delegate is the next middleware // in the pipeline. // Note that you could write multiple configuration steps here, not just this one. app.Use(async (context, next) => { // Note that although your IOwinMiddlewareProvider behaves like an ordinay Orchard dependency, the middleware // delegate lives on its own and will run detached from the provider! Because of this you'll need to either // access the Work Context as we do here, or inject your dependencies as Work<TDependency> objects. If you // build multiple middlewares with many dependencies here, doing the following is a better choice. var workContext = _wca.GetContext(); // But this would be an alternative: var siteSettings = _siteServiceWork.Value.GetSiteSettings(); var clock = workContext.Resolve<IClock>(); var requestStart = clock.UtcNow; // We let the next middleware run, but this is not mandatory: if this middleware would return a cached page // for example then we could just leave this out. await next.Invoke(); // Think twice when wrapping this call into a try-catch: here you'd catch all exceptions that would normally // result in a 404 or an 503, so it's maybe better to always let them bubble up. But keep in mind that any // uncaught exception here in your code will result in a YSOD. var requestDuration = clock.UtcNow - requestStart; // No need to use the ugly HttpContext, because we have OwinContext! var url = context.Request.Uri; // OK, but what if we _really_ need something from HttpContext? if (context.Environment.ContainsKey("System.Web.HttpContextBase")) // This is Orchard, so should be true... { var httpContext = context.Environment["System.Web.HttpContextBase"] as System.Web.HttpContextBase; if (httpContext != null) { // Voilá, we have the ugly HttpContext again! Like RouteData: var routeDataValues = httpContext.Request.RequestContext.RouteData.Values; // ...you know what to do. } } Logger.Information("The request to " + url + " on the site " + siteSettings.SiteName + " had taken " + requestDuration + "time."); // You see, we've done something useful! }) } }; } } Oh, and you'll see inline documentation for all the Owin interfaces :-). Also this sample will be part of the Training Demo module. Happy Owin'!

First Orchard CMS Workshop in Mumbai

Orchard CMS Mumbai User Group will be conducting the First Orchard CMS Workshop in Mumbai "Introduction To Orchard CMS and Theme Development" on 2nd Nov 2014. This user group will conduct workshops which will be aimed for developers new to Orchard and everyone interested in using Orchard in their projects. First Orchard CMS Workshop in Mumbai "Introduction To Orchard CMS and Theme Development". Workshop requirements? In order to join this workshop you will need to install the following things on your laptop Microsoft WebMatrix 3 SQL Server 2012 Express Visual Studio 2013 or higher (including free express editions) IIS 7.5/ 8 / 8.1 Any web browser How will you benefit from this workshop? You will get a good working knowledge of Orchard CMS and its admin panel and how to use Orchard CMS as an advance user. After completing this workshop you will be able to download Orchard, Install it locally and remotely on a live web server, use the Orchard admin panel very efficiently, Install new themes and modules from the gallery, create pages, blogs and pretty much everything that a content manager will do to manage his content using Orchard CMS. Theme Development will teach you how to create themes for Orchard CMS and even convert HTML templates into Orchard Themes. You will also learn about Shapes, Shape Tracing , Shape Templates, Placements , Packaging and Sharing. What things you will be learning in this workshop? Getting started with Orchard CMS Learn how to Install Orchard CMS on your local IIIS Learn about all the Orchard CMS Terminologies Learn how to use the Orchard CMS Admin Panel Learn how to host an Orchard CMS website on to a live web server Get Started with Orchard CMS Theme Development How to use Orchard CMS Command-Line Scaffolding How to create themes in Orchard CMS What are Shapes and How to override Shapes in Orchard What are Part Templates (Overriding Part Templates) What are EditorTemplates (Overriding EditorTemplate for Parts) How to override Widgets Placement.info : Placing shapes in a specific zone with a weight/positionPlacement.info : Matching(DisplayType, ContentType, Path) How to create a Nuget package for your Orchard Theme DotNest(dotnest.com) : The Saas Provider for Orchard CMS(like wordpress.com) This workshop is also featured on Orchard Beginner Who is Abhishek Luv? Abhishek Luv is an Orchard Dojo Trainer and a Contributor to the Official Orchard CMS Documentation and has created numerous Orchard CMS tutorials. Interests Asp.net MVC, Orchard CMS. You can see Abhishek's tutorials on Udemy (https://www.udemy.com/u/abhishekluv) and Orchard Beginner (http://orchardbeginner.com). Also visit Abhishek's trainer profile on Orchard Dojo. Register Now

Introducing Orchard Beginner

Are you confused, frustrated or intimidated about how to begin or get started with Orchard? Have no fear Orchard Beginner is here. Orchard Beginner is created with the aim to provide users and developers to have a Beginner's Guide to learn the ins and outs of Orchard. OB will introduce you to the Basics of Orchard i.e. Talking about Basic site management, User management and then step into more important advance features of Orchard like Queries, Projector, Taxonomies, Custom Forms, Workflows and Recipes. After that how to Get Started with Theme Development in Orchard and later on Module Development too. http://orchardbeginner.com/Again Welcome To Orchard Beginner.Happy Orcharding!!

Introducing Abhishek Luv, Orchard Dojo Trainer!

We welcome our new trainer, Abhishek Luv! You surely know Abhishek from the Orchard discussion board or from one of his online Orchard courses like the popular "Orchard CMS Tutorial for Absolute Beginners". From now on Abhishek is officially among the trainers of Orchard Dojo and thus also offering his Orchard training services through the Dojo too.

Orchard CMS Tutorial : Recipes In Orchard CMS

Start Date: 7/1/2014 5:48:00 PM End Date: Orchard simplifies the process of setting up a new website by letting you use website recipes. A recipe is an XML file that contains the startup configuration for an Orchard website. When you start Orchard for the first time, you can select a recipe that best matches the type of site you want to set up. For example, if you want your website to be a blog, you can select the Blog recipe, and much of the configuration work will be done for you. You can create your own recipes and customize the process of setting a website and configuring Orchard features. Recipes can also instruct Orchard to download and install modules and themes from the Orchard Gallery during website setup. This course describes How to use recipes How to create custom recipes Export or Import Recipes and How to create a new website using a Custom Recipe.

Orchard CMS Tutorial : Workflows in Orchard CMS

Start Date: 7/17/2014 5:50:00 PM End Date: The Workflows Module in Orchard provides us tools to create custom workflows for events or activities like Content Created, Content Published, Content Removed, Send Email, Timer and many more. This course shows you how to get started with Workflows in Orchard CMS. And the course consists of 7 Demo tutorial videos on Workflows and how to use workflows to create your own custom workflows for the following things : Custom Form Submission + Notification using Workflows Page Published if created by Admin if not Notify the administrator Closing Comments using Workflows Redirecting user after form submission using Workflows Assigning roles for new registering user using Workflows Comments Moderation Notification using Workflows Comments Removal User Notification using Workflows

Orchard CMS Theme Development Tutorial For Beginners

Start Date: 4/29/2014 5:47:00 PM End Date: In this course, You will learn the following things : Get Started with Orchard CMS Theme Development How to use Orchard CMS Command-Line Scaffolding How to create themes in Orchard CMS What are Shapes and How to override Shapes in Orchard What are Part Templates (Overriding Part Templates) What are EditorTemplates (Overriding EditorTemplate for Parts) How to override Widgets Placement.info : Placing shapes in a specific zone with a weight/position Placement.info : Matching(DisplayType, ContentType, Path) How to create a Nuget package for your Orchard Theme Note 1 : This course is about Orchard CMS Theme Development and not about Web UI Designing. So, Join this course to learn Orchard CMS and not Web Designing though we will be using Twitter Bootstrap CSS Framework in this course in order to give a good structure to our Orchard CMS Theme. Note 2 : This course is a Beginners course for anybody new to Orchard CMS. Theme creation in this course will be done by Overriding Shape Templates and Part Templates using the Shape Tracing and Url Alternates features in Orchard.

Orchard CMS Tutorial for Absolute Beginners

Start Date: 12/22/2013 5:43:00 PM End Date: 1/1/2001 1:00:00 AM What is this course about? Orchard CMS for Absolute Beginners is a course about the latest open-source .NET Content Management System which is written in ASP.NET platform using the ASP.NET MVC framework. What are the course requirements? In order to get started with this course you will need to install the following things on your computer Microsoft WebMatrix 3 SQL Server 2012 Express Visual Studio 2012 or higher (Including free express editions) Download Orchard CMS source and web project from GitHub IIS 7.5/ 8 / 8.1 Any web browser How will you benefit from this course? You will get a good working knowledge of Orchard CMS and its admin panel and how to use Orchard CMS as an advanced user. After completing this course you will be able to download Orchard, Install it locally and remotely on a live web server, use the Orchard admin panel very efficiently, Install new themes and modules from the gallery, create pages, blogs and pretty much everything that a content manager will do to manage his content using Orchard CMS. What things you will be learning in this course? Getting started with Orchard CMS Learn how to Install Orchard CMS on your local IIIS Learn about all the Orchard CMS Terminologies Learn how to use the Orchard CMS Admin Panel Learn how to host an Orchard CMS website on to a live web server This course is a ongoing online course on Udemy. Join This Course

Orchard Spring Harvest Challenge - Results

On the last (third) day of this year's Orchard Harvest we announced the results of the Orchard community's second module development competition, the Orchard Spring Harvest Challenge. The amount of submissions may be small ("only" 6), though in quality they certainly made up for it. The top 3 places are the following: MiniProfiler by Daniel Dabrowski Inline Editing by Matías Molleja Dynamic Forms by Cybage Software Pvt. Ltd. Congratulations to all participants! We also had the opportunity to bring in Daniel, the author of the winner module via Skype to the conference, where he did a live demonstration of the capabilities of the MiniProfiler module. For more information and the details about the event please visit its website and see the "Rules" page. If you'd like to know more about the last Orchard Harvest, you may want to read our reports written on-site about each day: Orchard Harvest - Day 1 Orchard Harvest - Day 2 Orchard Harvest - Day 3 Happy Orcharding until next time!