Add title to background tasks and improve the UI, Lombiq Node.js Extensions - This week in Orchard (17/02/2023)

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

Add a title to background tasks and improve the UI, update Azure AD Docs, add hidden content type settings to allow hiding a content type from GraphQL Schema, and a demo about the Lombiq Node.js Extensions project! Check out our post for the details!

Orchard Core updates

Add a title to background tasks and improve the UI

Currently, the background task name/technical name is the full name of the C# class. This is not a user-friendly name for a UI. The long technical name (aka task Id) should not be visible to the UI. The improvement here is to add a user-friendly title to every background task. We can continue to use the current "name" in the URL, and locate the task.

So, here is a summary of the changes regarding the background tasks UI:

  • A new search bar was added to the list page.
  • The technical name is no longer visible. Instead, we show a title.
  • The Create action was removed from the controller as we can never create a background task using a UI.
  • The Edit action will now create a settings entry in the document if an entry does not exist.

The following screen shows you the before and after screens of the Background Tasks landing page and the Edit background task page.

Background Tasks UI changes

Improve Azure AD Docs

The documentation of how to authenticate users with the Azure AD Account had a few errors and omissions, so after figuring out what needs to be configured to make login work, the documentation has been updated.

Updated Azure Active Directory documentation

Add hidden content type settings to allow hiding a content type from GraphQL Schema

GraphQL exposes all content types to the user. A permission check is applied to filter out content types users can't view. There is no way to control which content types should be exposed to the API. Not everyone wants to expose every content type. For example, if we have a SitePage content type we want everyone to be able to view it, but we do not want anyone to query it from the API.

The solution was to simply add a content type setting to hide the content type like we do today for the content parts.

Add hidden content type settings


Lombiq Node.js Extensions

The Lombiq Node.js Extensions project is supposed to provide front-end asset pipelines as a reusable project where under the hood, we actually run some Node.js scripts. We tried to do that in a way that the consumer of this project doesn't really have to know much about how it works and doesn't really have to configure much or anything at all. And we also set out to make this available as a NuGet package. So that you can drop in a completely working, but also configurable Node.js front-end pipeline which means compiling/minifying and linting SCSS and JS files and things like that. One more thing to know is that we drop Gulp from the equation altogether because Gulp is officially not compatible with anything higher than Node.js 12. It does work on Node.js 14, but we had problems with upgrading to Node.js 16, which came out over a year ago, and now the current LTS version is Node.js 18, so we decided to drop Gulp from the whole pipeline and build the whole project just using npm scripts and some custom written node.js scripts.

Lombiq Node.js Extensions readme

Now let's see a quick example of how to utilize it! We will check it out in our Open-Source Orchard Core Extensions full Orchard Core solution. You will find our other useful Orchard Core-related open-source projects there, too. Here you can find a class library called Lombiq.NodeJs.Extensions.Samples where we added a configuration section called nodejsExtensions to the package.json file.

Node.js configuration sample

Here you can see we are looking for JS files in the CustomJsFolder and SCSS files in the NonDefaultScssFolder and rendering them into those target folders. We also have assets copying, which we do a lot in our modules where we copy files from node modules (for example, Bootstrap or other front-end libraries) into Webroot.

Then we also have Markdown linting with another sample package.json file in the Lombiq.NodeJs.Extensions.SolutionMarkdownAnalysis project. The markdown can be enabled by providing a source folder which can be any relative path.

Markdown linting configuration sample

And we have a lot to cover! If you want to know more about this new project, check out this recording!

News from the community

Orchard Dojo Newsletter

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

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

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


  • Veronick said Reply

    Hello, I am checking your BaseTheme.Samples on Blog recipe. I setup tenant with blog recipe and then switched to BaseTheme.Samples. It didn't work at all - got error that MenuWdget is missing.
    I added helpful widget and helpful content types - still got error. The theme start to appear only after I added Flow helpful Extensions - weird.
    But the main menu - "about" and "blog" - home disappeared.
    Please advise, how I suppose to bring it back
    Thanks, Veronick

    • Dávid El-Saig said Reply

      Hi Veronick,
      You only have to enable the "Lombiq Helpful Extensions - Helpful Widgets " feature. However the "Lombiq Orchard Core Base Theme - Layers and Zones" recipe must be executed too.
      The menu items you mentioned have disappeared, because they are not compatible. Currently this theme's menu is only populated by INavigationProvider services (like admin menus, except it listens to providers that use the "main" name instead of "admin"). This is more modular, as Lombiq.BaseTheme was originally made for a large multi-module project. On the other hand the Blog theme looks for a single content-item that has the "main-menu" alias. For sure we should support this approach too, so I've opened a feature request.

      If you want to, feel free to follow these issues:

Add a Comment