Add HTML support to notification summary; how to change the idle logout time in Orchard Core? - This week in Orchard (03/05/2024)

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

Add HTML support to the notification summary, implement local storage emulator support for the Amazon S3 Media module, and in our newest Orchard Core Nuggets post, we discover how to change the idle logout time in Orchard Core! Without further ado, let's get started!

Orchard Core updates

Add HTML support to the notification summary

Let's say you need a way to be able to make notifications clickable on the UI. For example, you want to create a notification for when a content is published. When the user clicks on the notification, you want them to get redirected to the published content item. Currently, there is no way of doing that since we use the property Summary as an email subject which can't contain HTML.

The INotificationMessage interface was updated to include the addition of a Subject field, which facilitates the rendering of notification titles. Moreover, the existing Summary field has been transitioned to HTML format. This adjustment enables the rendering of HTML notifications in both the navigation bar and the notification center. Consequently, HTML notifications can now be created, affording functionalities such as clickable notifications.

Furthermore, the introduction of the NotificationOptions provides configuration capabilities for the notifications module. This structure comprises the following attributes:

  • TotalUnreadNotifications: This property determines the maximum number of unread notifications displayed in the navigation bar, with a default setting of 10.
  • DisableNotificationHtmlBodySanitizer: By default, the HtmlBody of notifications generated from workflows undergoes a sanitization process. However, this property grants the option to bypass this sanitization process.

The introduction of the NotificationOptions provides configuration capabilities for the notifications module

Implement local storage emulator support for the Amazon S3 Media module

Following the docs, you can only use the Amazon S3 Media module with a real, online S3 resource. For daily development, especially in a team, using a storage emulator is better though. This is currently an issue only for the Amazon Media Storage feature.

With the AWS SDK version we use currently, and due to us using virtual host addressing for buckets (i.e., mybucket.localhost, as opposed to path-style addressing with localhost/mybucket) this wasn't actually possible, so we needed to implement support for it too.

If you open up the Orchard Core docs page, you will find a section that helps you configure a local emulator by setting up a ServiceURL. The page also mentions two tools known to work with the mentioned settings.

Configuring a local S3 storage emulator

News from the community

Orchard Core Nuggets: How to change the idle logout time in Orchard Core

In our latest post in the Orchard Core Nuggets series, we discover how we can constrain how long people can remain logged in: If they share a device, especially a public one, then it's better to be on the safe side and automatically log them out after some time of inactivity. Check out the other posts for more such bite-sized Orchard tips, and let us know if you have another question!

How to change the idle logout time in Orchard Core - Orchard Core Nuggets

Theme development with Zig - Orchard Core Pair Programming by Lombiq

This is the very first session of Orchard Core Pair Programming by Lombiq! In these, we do an hour of pair programming with an Orchard Core community member about a project of theirs. We learn together a lot, share best practices, and write some good code. All this is live, and you can join us with your questions! This time, Ermir Pellumbi aka Zig will join us with a theme project. Your host and the "navigator" of the pair programming session will be Zoltán Lehóczky from Lombiq. Check it out here: https://youtube.com/watch?v=RdE6Io 5 PM UTC on the 6th!

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 470 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!

No Comments

Add a Comment