Our blog contains the activity stream of Orchard Dojo: general news, new resources or tutorials are announced here.

Featured tags

IIS
API
SMS
SEO
All tags >

Orchard Harvest 2024 montage video, Orchard Dojo case study - This week in Orchard (27/09/2024)

Cache top-unread notifications in the navbar for better performance, and add AddSiteDisplayDriver, and AddPermissionProvider extensions are the topics for this week. Check out our post for an Orchard Harvest 2024 montage video and for a case study about how we migrated Orchard Dojo to Orchard Core!

How to add workflows to an ASP.NET Core app - Orchard Core Nuggets

Do you want to send an email, when a form is submitted? Perhaps delete a content item after a certain amount of time? You don't want to write complex codes? Look no further with the Orchard Core Workflows feature you can achieve these, without writing any code. This way people who are not familiar with coding can also easily modify these processes.Are you new to Orchard Core? It's a great open-source framework and CMS built on ASP.NET Core. Check out the official getting started docs.Workflows in Orchard Core can be a powerful tool. A workflow is basically a visual script, that consists of two types of activities: Tasks and Events. A Task activity performs an action, for example sends an email, or creates a notification. An Event activity is like a trigger point, it listens for an event and it can activate Tasks. But why are workflows so useful? Here are some examples of what you can do with workflows:Automatically assigning a role to a user based on their input from a registration form.Moving content to an "Archived" state after a specified number of days since publication.Sending users a weekly email digest summarizing newly published content on the site.Sending a reminder to users who have incomplete profile information after a certain period.This is to name a couple.Let's see how you can create your own workflow! In this example we will create a workflow that displays a notification, but only for users in the Administrator role.First, go to Configuration → Features and make sure the Workflows feature is enabled. Now you can access the workflows in the Workflows menu point. Click on the Create Workflow button. Name the workflows for example "Display Notification for Administrators". You can leave the other settings as they are and click on Save. Now you will see the dashboard of our workflow. Here click on the Add Event button, so our workflow will have a starting point. Select the User LoggedIn activity, you can give it a title but it's not necessary. To make this your startup event, you will need to click on the event and then on the Startup task button. After that, the event card will turn green. Now let's add a task. Click on the Add Task button and select Validate User, as the description says it checks if the user exists for the current request and has the specified role(s)". When adding the task select the Administrator role in roles. Also select Set the 'UserName' workflow property if the user is authenticated. Okay, there is a starting event and a task, but how do we connect them? It's pretty simple: grab the green dot from the top of the starting activity and drag it to the task. We only need one more activity a task that displays notifications. So click on the Add Task button once more and select Notify. For the notification type let's go with Success, the message could be anything, but since we have the username from the previous activity, we can personally welcome the user. You can use Liquid syntax, just like this "Welcome, {{ Workflow.Properties.UserName }}!". After saving it, the only thing left to do is to connect the InRole dot from the top of the Validate User activity to the Sucsess Notification activity. In the end, your workflow should look something like this: Save it, then you can log off and log in with an admin user and see the results: That's it! You can modify this workflow how you want, add more events or tasks and based on this tutorial create your own!Did you like this post? It's part of our Orchard Core Nuggets series where we answer common Orchard questions, be it about user-facing features or developer-level issues. Check out the other posts for more such bite-sized Orchard Core tips and let us know if you have another question!

Orchard Core 2.0, Orchard Harvest 2024 - This week in Orchard (20/09/2024)

We are thrilled to announce that Orchard Core 2.0 is now available! Check out this post to know everything about the latest release of Orchard Core. In the upcoming weeks, we will check out the newest features and additions of Orchard Core 2.0. A huge thank you to everyone who attended Orchard Harvest 2024!

Blazor guide for decoupled CMS, Workflow Trimming Task - This week in Orchard (06/09/2024)

Blazor guide for decoupled CMS, a new Workflow Trimming Task, and our renewed Orchard Dojo website are the topics for this week. You can still cast your votes for the Jean-Thierry Kéchichian Community Award! Only one week left until the Orchard Harvest conference! Let's see the news for this week!

Make Resources Tag Helper extensible, keep only important virtual methods in drivers - This week in Orchard (30/08/2024)

This week's topics are making Resources Tag Helper extensible and keeping only important virtual methods in drivers. And after the nomination of exemplary community members to the Jean-Thierry Kéchichian Community Award, it's time to cast your votes! There are only two weeks left until the Orchard Harvest conference! Let's see the news for this week! Orchard Core updates Make Resources Tag Helper extensible Right now, you can define any custom resource type in the resource manager. For example, in Lombiq.VueJs, we use it to define Vue SFC resources and JS module resources. But there is a huge pain point: the <resources /> Tag Helper doesn't support any other resource type besides the built-in ones, so if you add a custom resource type you can require it, but it won't be rendered. This leads to a lot of added complexity and additional failure points because you have to display the resources in weird ways, such as using widgets, custom themes, or injecting the resources to render them in the Content zone (since other zones are not guaranteed to exist depending on the theme). Now both the <resources /> tag helper and the {% resources type: "..." %} Liquid tag can be extended with IResourcesTagHelperProcessor to run custom rendering logic. To make this possible, the OrchardCore.ResourceManagement.TagHelpers.ResourceType and OrchardCore.Resources.Liquid.ResourcesTag.ResourceType enums have been replaced with a common OrchardCore.ResourceManagement.ResourceTagType. It was renamed to avoid confusion with ResourceDefinition.Type. This change is breaking in code, but it does not affect the uses of the Razor Tag Helper or the Liquid tag in templates. Keep only important virtual methods in drivers Starting from Orchard Core 2.0, we mark all unnecessary methods in the base DisplayDriver obsolete. Then address all the warnings/errors by implementing the necessary methods. Also, the signatures of the UpdateAsync() method within the SectionDisplayDriver base class have undergone modifications. Previously, these signatures accepted the BuildEditorContext parameter. However, with this update, all signatures now require the UpdateEditorContext instead. This alteration necessitates that every driver inheriting from this class adjusts their contexts accordingly. These adjustments ensure compatibility and adherence to the latest conventions within the DisplayDriver class. Similar refactoring was done to the SectionDisplayDriver class. The following methods have been marked as obsolete: Display(TSection section, BuildDisplayContext context) Display(TSection section) Edit(TSection section, BuildEditorContext context) UpdateAsync(TSection section, UpdateEditorContext context) UpdateAsync(TSection section, IUpdateModel updater, string groupId) and removed the following methods: UpdateAsync(TModel model, TSection section, IUpdateModel updater, UpdateEditorContext context) UpdateAsync(TSection section, IUpdateModel updater, UpdateEditorContext context) UpdateAsync(TSection section, IUpdateModel updater, string groupId) UpdateAsync(TSection section, UpdateEditorContext context) EditAsync(TSection section, BuildEditorContext context) DisplayAsync(TSection section, BuildDisplayContext context) You can read more about the changes related to display management in the release notes of the upcoming release. News from the community Jean-Thierry Kéchichian Community Award 2024 - cast your votes At the end of last year, our good friend, Jean-Thierry Kéchichian, a truly extraordinary member of our community, unexpectedly passed away. To honor him, keep his memory alive, and foremost, inspire people to do good work for the community, we launched an award named after him for exceptional community members. Every year, the community votes on who has done the most for Orchard Core. This can entail activities in the form of e.g., code contributions (including documentation), help under issues and discussion, evangelization outreach, community management, or anything else. However, it needs to be public and tangible. After the nominations, it's now time to vote! Cast your vote here! Voting ends at 2:00 AM UTC on 12 September and we'll announce the winner at Harvest! Orchard Harvest 2024 Two weeks left until the Orchard Harvest conference! This year’s program is packed with insightful sessions, engaging panels, and ample opportunities to connect with the Orchard community and to make Orchard Harvest the biggest Orchard Core event of the year. All sessions will be recorded and published on the Orchard YouTube channel after the event, so even if you can't make it live, you can see the sessions. However, being there live will allow you to ask the speakers, meet other community members, and have a lot of fun! All indicated times are local time in Las Vegas. After each session, you'll have a chance to ask questions, and we'll have a short break too. Here is a detailed schedule to help you prepare for the conference. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on this YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today at Orchard Harvest Conference 2024, and get ready to level up your skills! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 463 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!