Contained item routing options for Autoroute Part, Helpful Libraries and Extensions - This week in Orchard (20/03/2020)

Gábor Domonkos's avatar
Announcement, Documentation, This week in Orchard

This week we would like to show you a demo about the contained item routing options for Autoroute Part among the latest changes of Orchard Core. Then don't forget to check out our updated Orchard Core Training Demo module and the brand new Helpful Libraries and Helpful Extensions from Lombiq!

Orchard Core updates

Toggle all widgets in Flow Part

It could be hard to use Flow Part with multiple widgets because you always have to expand each widget item individually. Sometimes it's quite annoying and it breaks the editing flow. To fix this issue now there is a little toggle all widgets button in the insert widget hover line. Using this button you can show and hide the content of a given widget. And of course, if you click on this button in the case of the Container Widget, the whole content of it will be hidden. A future improvement could be to add the same behavior for the Bag Part and Widgets List too.

ViewComponents should be searched in Views and Pages

There was a need to put a ViewComponent in the Shared folder of the Pages folder and not just into the Views. This is supported in Razor Pages, so now the ComponentViewLocationExpanderProvider has been updated to also search for the ViewComponents in the Pages/Shared folder.

Select All checkbox should react to selected items

In many views, we had the same issue and this has been fixed in the Contents, Lucene, Tenants, Users, Workflows and Workflow types pages. Now when you select some items from a list (but not all of them), then the select all checkbox will show you a minus icon, instead of a tick. The tick will be only shown there if every item is selected from the list. Let's see an example for it in the Tenants page about how it worked before and how it is working now.

Update taxonomy docs

The Taxonomies page of the Orchard Core documentation has been updated with two new additions. First, you could find a new example there about how to use the QueryCategorizedContentItemsAsync Orchard Helper, that provides a way to query content items that are categorized with specific terms.

Secondly, you will find some words about Tags. What is the purpose of tags and how to access the TagNames property using Razor and Liquid?

Move Header zone to body

There was a misunderstanding about what the Header zone is in Orchard Core. The Header zone is for the content and not for the metadata, which could be confusing. If you check the Footer zone, you will find that it's inside the body HTML tag, but the Header zone is rendered inside the head HTML tag. From now the SafeMode theme renders the Header inside the body HTML Tag and the TheAdmin theme does that too and also defines a new zone called HeadMeta that renders the content in the head of the layout.

Deployment cards equal heights

There was an issue that the deployment step card heights are not equal. If the description of the deployment step is only one row long, it will take less space than a deployment step, which description is more than one length long. Now, this issue has been fixed.


Contained item routing options for Autoroute Part

Let's say you created a new content item with the Taxonomy content type (or just used the Blog recipe) and attached the Autoroute Part to it. Now let's see the settings for this attached Autoroute Part first. Here you will see three new checkboxes to use:

  • Allow contained item routing: Check to allow users to enable routing of child content items.
  • Manage contained item routes: Check to allow this part to apply routes to child content items.
  • Allow absolute path: Check to allow users to enable absolute paths for child content items

Put a tick to these three and head back to your taxonomy content item to check the editor of it. Here you will see a new checkbox with the label of Route contained items. Put a tick here and now view your categories content item. The term content type itself doesn't have an AutoRoute Part on it so we just automatically generate a route for them based on the content item ID and the display text.

If we want to make the routing a little bit nicer then you could also add an AutoRoute Part to the term content types as well. Let's add the Autoroute Part to the Category content type and set the container settings of the Autoroute Part that we have just mentioned before. Then if you head back to your taxonomy (Categories in case if you are using the Blog recipe) and edit the definition of the Travel Category, you will find a box that will let you specify that a child content item will be routed to an absolute path. Put a tick here and save the content item. And now if you navigate to your taxonomy again and select the Travel term, you will see that the URL of it will be: https://localhost:44300/travel

If you uncheck the absolute option of the Travel category, the URL would contain the URL of your taxonomy, like https://localhost:44300/categories/travel

But we are just scratching the surface here. If you are interested in the full demo, don't hesitate to go to YouTube and view the recording!

News from the community

Updated Orchard Core Training Demo module to RC1

Orchard Core Training Demo module is a demo Orchard Core module for training purposes guiding you to become an Orchard developer. You can use this module as part of a vanilla Orchard Core source that including the full source code - which is the recommended way.

You can use it as part of a solution the uses Orchard Core NuGet packages, however, it's harder to look under the hood of Orchard Core features.

The module assumes that you have a good understanding of basic Orchard concepts and that you can get around the Orchard admin area (the official documentation may help you with that). You should also be familiar with how to use Visual Studio and write C#, as well as the concepts of ASP.NET Core MVC.

Now, this module is fully compatible with the RC1 version of Orchard Core. Yes, we know the RC1 version is quite old now, but we've done it a long time ago but didn't get to finish it.

Bug reports, feature requests, and comments are warmly welcome, please do so via GitHub. Feel free to send pull requests too, no matter which source repository you choose for this purpose.

Helpful Libraries and Helpful Extensions for Orchard Core from Lombiq

The Helpful Libraries for Orchard Core containing various libraries that can be handy when developing for Orchard Core CMS, to be used from your own Orchard modules.


  • Contents Libraries
  • DateTime Libraries with TimeZone conversion
  • Dependency Injection Libraries
  • Localization Libraries
  • MVC Libraries
  • Resource Management Libraries with Resource Filter feature
  • Utilities

The Helpful Extensions for Orchard Core is an Orchard Core module containing some handy extensions (e.g. filters for Projector).

Bug reports, feature requests, and comments are warmly welcome, please do so via GitHub. Feel free to send pull requests too, no matter which source repository you choose for this purpose.

A new website using Orchard 1.x

The project Metis enables EETT adjust its strategy regarding Quality Indices in modern technologies and practical measurements in order to be able to measure more effectively the quality characteristics of telecommunications networks, harmonized as much as possible on best practices of other regulators and domestic providers, be in line with the newest international standards and recommendations, and take advantage of the improvements offered by modern research measurement practices.

If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier it is now maintained by our team at Lombiq Technologies.

Orchard Dojo Newsletter

Now we have 125 subscribers of the Lombiq's Orchard Dojo Newsletter! We have started this newsletter to inform the community around Orchard with the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who you think would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news around Orchard and the details of the topics above, don't forget to check out the recording of this week's Orchard meeting!

1 Comment

Add a Comment