Orchard Core 1.4.0, Lombiq Base Theme for Orchard Core overview - This week in Orchard (03/06/2022)

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

We are thrilled to announce that Orchard Core 1.4.0 is now available! Check out this post to know everything about the latest release of Orchard Core! Now let's see the newest features and additions of the current release that we will continue next week too! Let's get started!

Orchard Core updates

Remove form tag from allowed tags during sanitization

Now we explicitly remove the form tag when we do sanitization. The default HtmlSanitizerService doesn't do that, but for security reasons, the community decided to do it. The documentation has been updated as well, so if you want to be able to render the form tags, then you need to configure it.

HTML Sanitizer defaults configuration

Set security stamp when the user is disabled

Disabling a user should invalidate the user's security stamp. When the security stamp validator revalidates the cookie, the user will then be expired. Here you can see the new UserDisabledEventHandler, which calls the UpdateSecurityStampAsync method, to update the security stamp for the user who needs to be disabled.

Set security stamp when user is disabled

Ignore IUpdateModel and BuildPartDisplayContext in console_log

The console_log on FlowPart shape returned logs of C# Runtime objects. To reproduce the bug, you had to follow these steps:

  1. Use {{ Model.Content | console_log }} or @Orchard.ConsoleLog((object)Model).
  2. Log model containing FlowPart.
  3. See the browser's log and find C# Runtime properties logged.

The expected behavior would be to just log the shape-related properties and ignore IUpdateModel and BuildPartDisplayContext properties in console_log for shape JSON.

Now you can see that the view models for editing and displaying the BagParts and FlowParts gets the IgnoreDataMember, and BindNever attributes to do not log these properties.

Ignore IUpdateModel and BuildPartDisplayContext in console_log

Demos

Lombiq Base Theme for Orchard Core

A few weeks ago, we mentioned that our Base Theme for Orchard Core is officially released. After that, we showed how you can use the Resource Management feature to include assets based on different conditions easily and how to construct your home page menu structure using the main navigation name in the Base Theme.

Our goal with this Base Theme for Orchard Core is to have all the common things that you usually do when making a theme, like setting up the layout and the zones, setting up variables and mixins, and so on. We hope this makes the whole theme development easier and faster for you.

This time we just want to give you a short overview of the other useful features that you can get if you build your own custom Orchard Core theme by using our Base Theme for Orchard Core.

The theme has some built-in zones (you have to run the Lombiq Orchard Core Base Theme - Layers and Zones recipe that creates these zones), which could be familiar to you if you used Orchard 1.x in the past because it has the same names as you faced with the default theme of the previous version of Orchard. The theme by default uses a front-end menu which is the same as the admin menu just uses the Main name instead of admin.

The Layout file of the Lombiq Base Theme for Orchard Core

The Layout.cshtml file of the theme automatically sets up the normal things like the viewport, language, etc, injects the Header, and injects the latest Bootstrap, so it actually overrides the one coming from Orchard Core with the one that you set up in your theme via npm. This is good if you need some features that are newer than the one in the release.

You can also find a very tiny JavaScript helper that lets you have a ready event. It makes the library a little bit slimmer.

Ready helper in the Lombiq Base Theme for Orchard Core

If you would like to know more about this theme, head to YouTube for a demo!

News from the community

Orchard Core 1.4.0

Orchard Core 1.4.0 is now available! If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the updated version of Orchard Core!

There is a new page in the documentation with the breaking changes and the new features. Upgrade your solution to 1.4.0 now! Feel free to drop on the dedicated Gitter chat and ask questions or use GitHub Discussions!

Orchard Core 1.4.0 release on NuGet

Orchard Core Commerce MVP planning and survey

A few weeks ago, you could see a nice demo about the Orchard Core Commerce module. And in that blog post, we also mentioned that Lombiq provides stewardship for this module. That actually means that we will do code reviews and work on features and fixes. To have that, Márk Bartha (who is the project leader from our side) started this thread and added this survey. This is about asking the community what the most important features for you would be in an Orchard Core-based e-commerce solution. If you do e-commerce or if you have an opinion about e-commerce, please share your opinion here. The point of this is to try to do not all the things but focus on what is really needed first.

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 275 subscribers! 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 is 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 Orchard meeting!

No Comments

Add a Comment