This week in Orchard - 12/06/2019

gabor.domonkos

New domain for the home page and the documentation of Orchard Core! New list query helpers, updated documentation, designing the admin UI of Orchard Core and many more are waiting for you in our upcoming post!

On Orchard Core

Potential fix for disabling core modules

There were some modules in Orchard Core that if you disable you break your site. For example, if you disable the OrchardCore.Recipes module, you will face with a message:
InvalidOperationException: Unable to resolve service for type 'OrchardCore.Recipes.Services.IRecipeMigrator' while attempting to activate 'OrchardCore.Menu.Migrations'.

But you will see errors if you disable the OrchardCore.Settings, OrchardCore.Features or OrchardCore.Scripting modules too. From now you can set the IsAlwaysRunning property to true in your FeatureAttribute or ModuleAttribute to make sure your feature can't be disabled. Let's see the content of the Manifest.cs file of the OrchardCore.Features module, where you will see the new IsAlwaysEnabled boolean.

[assembly: Feature(
Id = "OrchardCore.Features",
Name = "Features",
Description = "The Features module enables the administrator of the site to manage the installed modules as well as activate and de-activate features.",
Dependencies = new [] { "OrchardCore.Resources" },
Category = "Infrastructure",
IsAlwaysEnabled = true
)]

Now if you head to Configuration -> Features and search for a module that is not allowed to disable, you will see that the red Disable button is missing near that module.

New list query helpers

There are two new helpers and filters to list the items of a List Part. The two news Orchard helpers are:

  • QueryListItemsAsync: returns the enumerable of list items satisfying given predicate.
  • QueryListItemsCountAsync: returns the number of list items satisfying given predicate.

These helpers have their corresponding Liquid Tags as well, which are the following:

  • list_items: the list_items filter loads published list content items for given ContentItem object or explicit ContentItem ID given as a string.
  • list_count: the list_count filter counts published list content items for given ContentItem object or explicit ContentItem ID given as a string.

Including Azure Active Directory recipe step and updating the documentation

When you are using the Azure Active Directory, you have to set up several things, like the Application ID or the Callback Path. Now you can set those with several other ones during recipes using the settings step. In the documentation, you will find a sample of how you can do that.

New UI for queries, admin templates, and templates

The work continues on unifying the admin UIs of the admin pages of Orchard Core. This week Antoine Griffard designed the queries, templates, and admin templates pages to have a consistent look. The queries page has no select all option because there are no bulk actions on that one yet.

Naming convention on NuGet.org

When you create your own third party package for Orchard Core you can publish it to NuGet.org anytime you want. When uploading your package you have to give it a speakable name. Users probably will type the Orchard Core keywords to find packages that contain modules or themes that can be used with Orchard Core, so that could be a good way to include the OrchardCore word in the title of your package. But if you name your package OrchardCore.MyAwesomeFeature how would the users know that which packages are the official ones for Orchard Core and which are the modules that are provided by other developers?

To solve this problem Sébastien Ros reserved the OrchardCore ID prefix. So when you navigate to NuGet.org and search for OrchardCore, you will find a blue tick near some packages. These packages are the official ones with the hover text: "The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.".

The recommendation is to suffix your package with OrchardCore. For example, the name of the Disqus module in NuGet is Disqus.OrchardCore. You can also have a tag containing Orchard Core to add to your package.

There could be documentation about how to create and publish your own module to NuGet.org. This documentation could contain the naming convention too, therefore the packages in the future could have the convention mentioned above and be consistent across NuGet.org and can be easily identified as a third-party module.

New orchardcore.net domain

You can reach the Orchard Core Documentation under the https://orchardcore.readthedocs.io URL and the official website of Orchard Core under the https://orchardproject.net address. The goal is to have a more unified experience for the users when they are meeting with Orchard Core browsing the online space. Therefore the community has bought a new domain for every content related to Orchard Core. First of all, the official website of Orchard Core is now accessible under the http://www.orchardcore.net address. But that's not everything! This site was a simple static site, but from now this site is powered by Orchard Core! This comes with a whole lot of new opportunities, for example, to fill the site with additional content like blog posts and other news around Orchard Core.

And if there is a new domain let's use it for other purposes too! Now you can also reach the documentation of Orchard Core by visiting the http://docs.orchardcore.net URL. This site has the same content as https://orchardcore.readthedocs.io, but it's easier to remember and placed under the orchardcore.net domain.

On Lombiq

Extended title for This week in Orchard

One of the main goals of This week in Orchard posts to give you updates and news about the different kinds of features and improvements of Orchard 1.x and Orchard Core. For now, we have more than 60 posts containing useful information that could be helpful (we hope so) for the developers and any others who are interested in working and using Orchard in the future. To find the information you need you to have to search for different keywords. That's why we are thinking about changing the titles of our This week in Orchard series by adding some keywords about highlights in the title of the posts and newsletter subjects. What do you think about that? Could it be helpful for you in the future? Please help us and tell your opinion on this Twitter poll!

Orchard Dojo Newsletter

Now we have 106 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!