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

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!

Featured tags

IIS
API
All tags >

Remove the set as startup task button for non-event Activities, Lombiq Helpful Libraries - Source Generators - This week in Orchard (02/08/2024)

Fix WYSIWYG/Trumbowyg editor colors when the dark theme is enabled, remove the set as startup task button for non-event Activities, and a demo about the Source Generators included in the Lombiq Helpful Libraries are the topics for the week. Let's see the details! Orchard Core updates Fix WYSIWYG/Trumbowyg editor colors when the dark theme is enabled When dark mode is enabled, the Trumbowyg editor modals do not follow the dark theme and instead display in light mode. The foreground color of the WYSIWYG/Trumbowyg editor buttons is almost indistinguishable from the background color when hovered or focused. This inconsistency affects the user experience. The Trumbowyg editor modal should adapt to the active theme and display in dark mode when dark mode is enabled. This change fixes the Trumbowyg editor issues in dark mode by switching to the component's default theme for both light and dark modes. It also keeps a few custom CSS classes to ensure the borders match Orchard's styles. Remove the set as startup task button for non-event Activities You can set Task-type Activities as startup tasks on the workflow canvas. However, this doesn't make sense, since a Task can't start a workflow, only an Event can. The startup task button should only appear for Events. Also, the terminology "startup task" is incorrect as well, since it should say "startup Event". The goal of this fix was to remove the set as startup task button for non-event activities and rename the "Startup task" tooltip to "Startup event". To check this out, make sure that the Workflows feature is enabled under the Configuration -> Features option from the admin UI of Orchard Core. Afterward, you can head to the Workflows option to create a new workflow. We added a Content Created Event and a Notify Specific Users Task to our workflow. As you can see, we managed to set the Content Created Event as the startup event (it has a green background), but we cannot set the Notify Specific Users Task as a startup task because the "startup task" button is not available on the contextual menu of that task. Demos Lombiq Helpful Libraries - Source Generators The Lombiq Helpful Libraries contains various useful libraries that can be handy when developing for .NET, ASP.NET Core, and Orchard Core, to be used for your projects. The topic for this demo is the freshly added Source Generators library, a collection of helpful source generators. We concluded that when you include a vendor resource in Orchard Core, it's a good idea to include the version too, for cache busting. What we did before was manually set the version number of the scripts and styles we wanted to include in the Resource Manifest. We have to maintain this version number in two files; in the package.json and the ResourceManagementOptionsConfiguration class. So, the issue was about maintaining this in two places, and by introducing source generators we can do it in one go. The readme file of the Source Generators library shows you how you can use the ConstantFromJsonGenerator, which is a source generator that creates a constant from a JSON file. As you can see, first of all, you need to have a JSON file in your project and set the Build Action of the JSON file to AdditionalFiles. You need to reference both the Source Generator and the Attributes project and wherever you want to use the JSON file, make sure to have a partial class and add the ConstantFromJsonGenerator attribute to it. Here we tested this with the ResourceManagementOptionsConfiguration file of the Lombiq Vue.js module for Orchard Core. As you can see, the partial ResourceManagementOptionsConfiguration class contains the ConstantFromJson attribute where we defined a constant called VueVersion, provided the file name which is packages.json, and set vue as the property name. This means that we get the value of the vue property from the file called package.json and assign the value of this property to the auto-generated VueVersion string. And as always, if you want to know more about source generators, head to YouTube for a recording! News from the community Orchard Harvest 2024 Program The full Orchard Harvest program has finally arrived. 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 and take advantage of early-bird pricing at Orchard Harvest Conference 2024. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 466 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!

Convert Themes views to shapes, Orchard Core Commerce 2.0 - This week in Orchard (26/04/2024)

Convert Themes views to shapes, improving notification filter performance, and announcing the 2.0 release of the Orchard Core Commerce project are the topics for this week! Without further ado, let's get started! Orchard Core updates Convert Themes views to shapes Before this change, there was no flexible way to contribute to the output of the Themes views. For example, there was no way to inject a "Customize" button next to the Enable/Disable button to allow customizing the appearance. The goal of this change is to convert the concrete view of the Themes view to shapes so we can inject shapes into the output. As you can see, the outcome is the same. The only difference is that people can inject shapes into variance zones now. Improve notification filter performance After the move to System.Text.Json some metrics went up. This fixed the lock contentions and large object heaps. Plus, some other GC stats are also better. The creation of JsonSerializerOptions uses a weak reference and locks internally so they shouldn't be created too often. The NotifyFilter was created then eagerly while not necessary. Now it's only on demand with some extra caching. The NotifyFilter class is a filter, meaning it will be invoked in every request. Orchard Core will invoke its OnHandlerExecuting method. And on every request, it was creating a new filter instance and it was then creating a new JsonSerializerOptions. It's creating a new one because it needs to set a dynamic converter, a converter that needs something that the DI resolves. And creating a JsonSerializerOptions object is expensive. Now you can just resolve the IOptions<NotifyJsonSerializerOptions> which class contains the JsonSerializerOptions to improve the performance. News from the community Orchard Core Commerce 2.0 Orchard Core Commerce is an Orchard Core port and partial rewrite of the open-source Nwazet Commerce module that was built for Orchard CMS 1.x. Nwazet Commerce was initially built in 2012 by Bertrand Le Roy, loosely based on a commerce sample by Sipke Shoorstra. The initial goal of Nwazet Commerce was to power the website of the hardware startup Nwazet. While Nwazet is no longer operating, the Nwazet Commerce project went on and was further developed by a group of passionate contributors who are using the platform for their own, and their customer's websites. Like Orchard, Nwazet Commerce was built with extensibility in mind, and as such, it has its own extensions (typical examples include local tax and shipping modules). It's also a pure, idiomatic Orchard. Orchard Core represents a major evolution of the Orchard design principles and is sufficiently different that running Nwazet Commerce on it will necessitate significant work. As such, the community decided that starting from a blank slate was the best way to go, so they will port Nwazet Commerce piece by piece, being careful to accurately apply Orchard Core's new design principles. The community also decided to adopt a new name that gets rid of the now obsolete origins and establishes our ambition for the module to become the go-to commerce module for Orchard Core. Back in 2022, we published a demo where you could see the current state of the module. A few months later, we reached another milestone when we finished with the basic implementation of Stripe Payment integration (without taxation, shipping, etc.). Stripe is a payment service provider that business owners can use to accept dozens of payment methods, from credit cards to buy now, pay later services. Stripe Payments handles the steps between a customer providing their card information and learning that their payment has been accepted. As you may know, Lombiq provides stewardship for the Orchard Core Commerce module. That means that we do code reviews and work on features and fixes. At the beginning of 2023, we released the 1.0 version of the Orchard Core Commerce module! You can read some of the key features of the release in this post. You can easily try it out by cloning this repo and building and running the OrchardCore.Commerce.Web project. Thanks to Auto Setup, the site will be set up with the OrchardCore Commerce - Development recipe. After you can go to the dashboard, using the credentials admin and Password1!, and go to Content -> Content Items to create your first Product. And one month ago, we released the 2.0 version of the Orchard Core Commerce module! This is a major version increment because there are some breaking changes, so watch out! We have upgraded to the latest Orchard Core 1.8 packages too. One of the breaking changes is that the built-in Stripe payment provider support has been separated into a standalone package. For now, it's still the only payment processor we support out-of-the-box but we plan to expand that in the near future. You can also implement your custom payment providers. We've also added product listing with filter, search and paging support, the ability to resume payment from the order page, more documentation including a guide, and many other improvements, bug fixes, and quality of life improvements. Check out the full list of changes here. 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!

Upgrade the Default Theme to use Bootstrap 5.3.2, migrating an Orchard 1 DotNest site to Orchard Core - This week in Orchard (03/11/2023)

Upgrading the Default Theme to use Bootstrap 5.3.2, adding placeholder for Taxonomy Part and Taxonomy Field Settings, and a case study about migrating an Orchard 1 DotNest site to Orchard Core! Check out our post for the details! Orchard Core updates Upgrade the Default Theme to use Bootstrap 5.3.2 Last week we mentioned that the admin theme of Orchard Core has been upgraded to use Bootstrap 5.3.2. Now the Default Theme also utilizes this version of Bootstrap, and the same improvements are applied here as for the admin theme. Now, you can use the same Bootstrap version for a front-end theme and a back-end theme. It also affects performance because from now on you don't have to worry about loading or caching two different libraries. The front-end theme now also has a theme toggler, so you can easily switch between a light theme and a dark theme, and if you want to implement your color, you can add your theme and use that for the admin and the front-end theme, as well. In this case, we set up our site with the Software as a Service recipe because the default Site theme here is the TheTheme. As you can see in the GIF, both the back-end and the front-end theme have three modes, and you can easily switch between them. Add placeholder for Taxonomy Part and Taxonomy Field Settings When adding a new Taxonomy, the Term Content Type dropdown by default selected the very first content type that is available in the menu because there is no placeholder. This happens because we do not have an option with no value. By default, we should have a placeholder so that the user knows that they need to select a value. Also, the Term Content Type should be a required field, and the Title Part should be required by default. Also, in the TaxonomyFieldSettings, we have the same missing-placeholder problem. And now these issues have been fixed. Here, we have a site set up with the Blog recipe. We edited the definition with the Blog Post content type and added a Taxonomy Field to it. When we hit Edit near our newly added Taxonomy Field, you can see the Select a Taxonomy placeholder in the dropdown. And if you create a new Taxonomy content item, you can see another placeholder in the Term Content Type dropdown. News from the community Show Orchard case study: Migrating an Orchard 1 DotNest site to Orchard Core Maybe you have already heard about Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier, it is now maintained by our team at Lombiq Technologies. If we add a new website to Show Orchard, we always announce it in the This week in Orchard series. Like we just did a few weeks ago when we added the website of Property Brokers, which is New Zealand's largest regional real estate agency. Though the Show Orchard website is simplistic in its design, migrating data and re-implementing various elements presented its own set of challenges. Nonetheless, we are pleased to announce that the site is now seamlessly operating on DotNest Core. Our next step is to transition all of our remaining DotNest sites to Core as well. If you're considering migrating your Orchard 1 website to DotNest Core, this is an excellent time. Should you have any questions or encounter challenges, don’t hesitate to reach out to us. We're always ready to bring our expertise to your unique project needs. Get in touch with us today, and let's start making your Orchard Core website even better! And don't forget to check out our case study about the details of the migration! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 485 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!

Add support for user phone number, SMS support and two-factor authentication using SMS service - This week in Orchard (25/08/2023)

Add support for user phone number; add styling to Pager in TheAdmin theme, and a demo about SMS support and two-factor authentication using SMS service! Check out our post for the details! Orchard Core updates Add support for user phone number Currently, we do not support PhoneNumber in the UserStore, which is supported in the default identity implementation, and it's a nice feature to have if you are implementing an application that requires the user to enter and confirm their cell phone number, similar to the way email verification works. The latter is easy since UserStore implements IUserEmailStore, but when using UserManager.GenerateChangePhoneNumberTokenAsync, the call fails with a NotSupportedException: Store does not implement IUserPhoneNumberStore<TUser> exception. From now on, UserStore implements IUserPhoneNumberStore, updating User accordingly by adding a Phone property. This means a phone number is now supported in the UserStore and the User object. Let's see what the new field looks like in the user's profile! If you navigate to Security -> Users and hit the Add User button, you will find the new Phone Number field there. You may notice a black exclamation icon at the end of the editor, meaning that the phone number for this user is unverified. Add styling to Pager in TheAdmin theme This change is about improving the look and feel of the Pager across the admin UI. New views in TheAdmin theme were added to style the pages at the theme level, no base shapes were altered. The pager looked like this: And after this change, it looks like this: Demos SMS support and two-factor authentication using SMS service In this demo, you can see a brand-new feature for Orchard Core, the SMS module. This module provides you with a way to have SMS services on your site, and then you can do whatever you want with them. There are actually three features around it, and we will check out all. SMS: Provides settings and services to send SMS messages. Two-Factor SMS Method: Provides users a two-factor authentication method through an SMS service. SMS Notifications: Provides a way to send SMS notifications to users. Let's enable all of them, and after that, you will find a new option under Configuration -> Settings, called SMS. Here you can configure your provider. You can choose from Log and Twilio. If you select the Log one, any message that is sent through the SMS provider will be just printed in the log files, like: "A message with the body {body} was set to {phoneNumber}". You can implement your own provider, but by default, we provide you with Twilio. Twilio is probably the most commonly used service. If you select it, you can configure it with the information that is coming from your Twilio account. So, this is the SMS module, and to build more on top of it, here comes the Two-Factor SMS Method feature. If you enable it, you can navigate to the Security settings, and add the new SMS authentication as a new two-factor authentication method. To do that, you have to verify your phone number, and you will get a verification code that you have to apply. The third feature is called SMS Notifications. With this module, you can actually deliver notifications through SMS. If you enable this and you can go to your user profile (Security -> Users), you will see another notification method here which is called SMS Notifications. And if you have the Workflows feature enabled, you can utilize a new task, called Send SMS, meaning you can send SMS messages directly from the workflow. If you want to know more about this feature, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 520 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!

Improved Feature Profiles feature, self-service tenant registration - This week in Orchard (03/03/2023)

Add placement example for dynamic parts, responsive Admin Theme, improve the Feature Profiles feature, and a demo about self-service tenant registration! Check out our post for the details! Orchard Core updates Added placement example for dynamic parts We have an article on the Orchard Core Documentation site that is about display management and placement files. Any module or theme can contain an optional placement.json file providing custom placement logic. This article describes the format of the placement.json file, how to render a shape, editor shape placement, and so on. Now you can see a new section here as well, telling you the structure of the placement file when you are working with dynamic parts. Responsive Admin Theme Last November, we mentioned that a huge improvement is coming to Orchard Core that makes the Admin Theme responsive. Note, that it's an option that is disabled by default, and you have to do some modifications in the appsettings.json file to make this work (under the StyleSettings section), and after that, your custom editors rendered in the admin have to support this, by utilizing the necessary helpers, like Orchard.GetEndCssClasses(). You can read more about how to set up the TheAdmin theme in the Change Logs of the upcoming release. Improve the Feature Profiles feature If a Feature Profile is renamed, it'll break existing tenants since the name is stored in the appsettings.json file, and also, other modules are not able to contribute to the Feature Profiles setup. We have had Feature Profiles for a long time now in Orchard Core, and if you haven't heard about it, you can check out a demo in this post. In a nutshell, this is about using app settings/configuration to add the ability to restrict the features and/or themes that are available to either a tenant and/or all tenants or a mix of both. You can add Feature Profiles under Configuration -> Tenant Feature Profiles once the Tenant Feature Profiles module is enabled. Here you can set the rules that you want to use. By default, you can have an Include and an Exclude rule. By using these, you can easily say that I don't want to allow the given feature for the assigned tenants or I want to allow my custom feature to the given tenants. The Expression contains the name of the feature, but it can include stars like OrchardCore.*Templates that will match the OrchardCore.Templates, OrchardCore.AdminTemplates and OrchardCore.ShortCodes.Templates feature as well. Let's say that we don't want to allow the TheAgencyTheme and the features with names that start with OrchardCore. and end with .Templates. And if you create a tenant, you can optionally specify which Feature Profile should be applied to the given tenant. You can rename the Feature Profile if you want, and renaming it could cause some issues. So, from now on when using Feature Profiles, we add an ID to the profile instead of using the existing editable name. This way renaming the profile won't break anything. To keep it backward compatible, we treat the current name as the ID for old entries. Note renaming old entries won't cause any issues since we consider the ID as the name before the new name is saved. If you check out the appsettings.json file of this tenant, you will see the ID here. And also, we allow the user to have multiple profiles more than explained in In a SaaS setup, how can the SaaS admin/owner manage the tenant features? Demos Self-service tenant registration In this demo, we can see a module created by Niraj Soni. He provides you with a new way to implement a site sign-up, so you actually create steps for someone to sign up, pay and get access to the tenant in a SaaS environment and everything happens right away. If you install the module, you will see a Registration Pages option in the menu under Multi Tenancy, where you can actually create the flow of the sign-up process. Here is a page called School, where you can capture school-related information using widgets during the sign-up process, like address, city, state, zip, etc. On another page, you can capture information to create an admin account, like user name, password, and email. There is also a step to verify email and capture payment. This contains integration with Stripe, so this will be utilizing Stripe. And finally, you can review and finish the whole process. Using this feature, you can add any page you want; you can remove a page if you want. And that's just the surface! If you would like to see this in action, check out this recording on YouTube! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 406 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!

Keep IDisplayManager backward compatible, adding permission check when querying content using GraphQL - This week in Orchard (02/12/2022)

Keep IDisplayManager backward compatible, remove extra spacing around editing contents, flows, and Bag Part, and add a permission check when querying content using GraphQL. Check out our post for the details! Orchard Core updates Keep IDisplayManager backward compatible Let's assume you are using BuildEditor of DisplayManager to create a shape. Now you will find method overload to avoid method not found exception in modules that depends on IDisplayManager. But why is that exception can happen? The BuildEditorAsync and UpdateEditorAsync methods in the IDisplayManager interface now accept a new htmlPrefix parameter, and the groupId is now not an optional one. To keep the IDisplayManager backward compatible, the old methods are marked as obsolete such that old compiled libraries use the obsolete methods, but new code knows it should use the new methods. Remove extra spacing around editing contents, flows, and Bag Part This change introduces some changes in the admin UI. We have some extra spacing around the Bag Part, Widget List, and Flow Part. There was also extra spacing around the create/edit form in the contents and the page title. The goal of this is to fix the inconsistent spacings and make the look and feel of the admin UI nicer. Add permission check when querying content using GraphQL Let's say you want to grant a user permission to be able to query their own content only using GraphQL. However, there seems to be no way to do that like we can do it using the UI. It would be nice to be able to apply the permissions as we do in the UI for GraphQL. So, here comes a new filter that honors their permissions. Also, GraphQLContentOptions.ConfigureContentType(...) had no effect. If the user configures contentType as hidden, we still show it anyway. This was also fixed. News from the community Orchard Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or you are looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 379 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 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!

Orchard Harvest 2023, User Notifications - This week in Orchard (28/10/2022)

Adding default form templates for the Default Theme, adding wrapper element for all content fields, demo about the User Notifications module and don't forget to fill out a survey about the next Orchard Harvest conference! Orchard Core updates Adding default form templates for the Default Theme Currently, all of the form widgets are rendered using Widget.cshtml which renders too much HTML without any added value. The goal here is to create default Widget-Form, Widget-Input, Widget-Label, Widget-Select, Widget-TextArea, Widget-Validation, and Widget-ValidationSummary templates. It means that now, you will find these default form templates if you open up the Default Theme. Adding a wrapper element for all content fields There is no easy way to hide/show content fields "label and input as a group" using JavaScript event because there is no wrapper element to select. The goal here is to add a wrapper element to all of the content fields to allow the user to easily hide/show the entire field block using JavaScript. Here you can see the editor of the Text Field where the wrapper has now new classes with ones that you can easily use to distinguish the same kinds of Text Fields from each other. For example, the Text Field called Subtitle of the built-in Blog Post content type has the following HTML structure. Here you can see that the third class and the ID contain the technical name of the Text Field, which makes targeting the given field easier. Adding GetPageSize method to account for MaxPageSize throughout the code Now we have a new GetPageSize method in the PagerOptions class that returns the maximum number of the allowed page size based on the values of the default and maximum page size numbers. And we are using the value coming from this method for every occurrence, where we are constructing the Pager by passing it as the second parameter. Which is the default page size in this case. Demos User Notifications The goal of the User Notifications module is to push notifications to the user, meaning notify the user somehow. There are many ways you can notify a user, one of them being a web notification, you can do SMS, you can do push to a mobile application, etc. In Orchard Core right now, there is no way to send notifications, but there is a way to send emails. Let's navigate to Configuration -> Features and enable the Notifications module. This will provide a way to notify users. After you enable this module, you will see a new bell icon near the Dark mode icon at the top right. If you click on that icon, you will see a list that shows you all of the notifications that you have right now. You can click on them to mark them as read, or you can click on All Notifications at the bottom, which will redirect you to the page where you can see all of your notifications. Here you can see a list of all of the notifications available. You can use the search here, and filter them only to see the read or the unread notifications. You can sort by recently created, or by previously created. You can also mark the unread notifications as read, mark the read notifications as unread or you can delete the notifications as well. You can also hit the Mark All As Read button to mark everything as read. Now let's see how you can generate notifications! Notifications can be generated via code by injecting INotificationManager. But you can also generate notifications via Workflows. Here you can see we have a workflow called Notify Content Owner, which contains the custom activities provided by the Notifications module. Here we put two events, one for when the Blog Post content item is published and one for when the Article is deleted. And here, you can also see the two new Notify content's owner activities as well. Let's check out the content of the first Notify content's owner activity! Here you can see we have proper Liquid support to customize the summary, and the body of our notification. If we open up the editor of the second Notify content's owner activity, you can see here we have some HTML code in the body as well. To be able to render the HTML properly, don't forget to put a tick in the "The body contains HTML" checkbox. And that's not everything! If you would like to know don't forget to check out this recording on YouTube! And if you want to try out this feature for yourself, you can find the code in this PR! News from the community Orchard Harvest 2023 For those who are too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference. The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or are you looking forward to having a Harvest again, please share your opinion with us by filling out this survey about the upcoming Orchard Harvest! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 381 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 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!

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

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. 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. 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: Use {{ Model.Content | console_log }} or @Orchard.ConsoleLog((object)Model). Log model containing FlowPart. 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. 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.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. 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 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!

Bootstrap 5 in the default Admin theme, Orchard Core Commerce survey - This week in Orchard (27/05/2022)

The default Admin theme now using Bootstrap 5, logging warning when a Zone isn't a Shape, adding documentation on Query API results changes and if you do e-commerce or if you have an opinion about e-commerce, please share your opinion with us by filling out this survey! Orchard Core updates Bootstrap 5 in the default Admin theme The Admin theme now using Bootstrap 5! The change only affects the Admin theme, there is no change in the built-in themes, you can use whatever Bootstrap version would you like to use there (or any other framework of course). If you open up the ResourceManagementOptionsConfiguration file in the Resources module, you can see that now you have the option to use the new Bootstrap version. Log warning when a Zone isn't a Shape You can't use both <zone> tag helpers and widgets for the same zone. If you have a widget in the zone, the content in zone tag helpers are ignored. Steps to reproduce the behavior: Create a new Orchard Core CMS Web App solution. Add a new Orchard Core Theme project. Replace the Views/Layout.liquid with Views/Layout.cshtml having the following content to keep it simple: @inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers@addTagHelper *, OrchardCore.DisplayManagement@addTagHelper *, OrchardCore.ResourceManagement<zone name="Footer"> <p>Hello from zone tag helper!</p></zone>@await RenderSectionAsync("Content", required: false)@await RenderSectionAsync("Footer", required: false) Launch and set up the web app. Go to /Admin/Themes, and select the newly created theme. Confirm "Hello from zone tag helper!" is visible on the home page. Create a zone "Footer" and a layer "Always" (boolean true condition). Create a widget content type with Html Body and add a new item with "Hello from Widget!" to the Footer zone. Go back to the home page. You only see Hello from Widget! and any tag helpers are ignored. The expected behavior would be that you should see Hello from zone tag helper!Hello from Widget! in the footer. From now, the code will log a warning instead of failing silently if the zone is not a shape. Here you can see the logging in the ZoneTagHelper and in the ZoneTag. Add documentation on Query API results changes If you called the api/query/{name} endpoint in Orchard Core 1.0.0, the query returned with the following schema: [ { "Id": 321, "UserName": "test", "Email": "[email protected]" }] If you upgraded to Orchard Core 1.1.0, this endpoint returns the data in a different format: { "items": [ { "Id": 321, "UserName": "test", "Email": "[email protected]" } ] } To make sure you handle the response correctly, the documentation of Orchard Core has been updated to reflect these changes. News from the community 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 271 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!

Update ImageSharp.Web v2, Lombiq Helpful Libraries - Resource Management for Orchard Core - This week in Orchard (19/05/2022)

Updating ImageSharp.Web v2, removing pagenum=1 from the 1 pager link to improve SEO, adding OnMessageSendingAsync() protected method and news and updates around the Lombiq Helpful Libraries. Check out our current post to read about the details! Orchard Core updates Update ImageSharp.Web v2 ImageSharp is a new, fully-featured, fully managed, cross-platform, 2D graphics library. Designed to simplify image processing, ImageSharp brings you an incredibly powerful yet beautifully simple API. ImageSharp is designed from the ground up to be flexible and extensible. The library provides API endpoints for common image processing operations and the building blocks to allow for the development of additional operations. ImageSharp.Web is a high-performance ASP.NET Core Middleware built on top of ImageSharp that allows the processing and caching of image requests via a simple API. ImageSharp.Web provides API endpoints for common image processing operations and the building blocks to allow for the development of additional extensions to add image sources, caching mechanisms, or even your own processing API. A few weeks ago ImageSharp.Web v2 had been released, and now Orchard is using the latest version of ImageSharp thanks to Dean Marcussen. ImageSharp is used in Orchard Core when you would like to work with Media Profiles or when you work with images (like setting up a crop point) from the Media Library using the Media Field. Remove pagenum=1 from the "1" pager link to improve SEO There's a minor SEO problem with the pager when pagenum=1. Since the content of pagenum=1 is identical to the page where the pagenum parameter is absent, SEO audit tools want a canonical URL to be specified. Though arguably, the pagenum parameter should just be removed when the value is 1. Steps to reproduce the behavior: Set up your site with the Blog recipe. Navigate to Configuration -> Settings -> General and set the Page size to 1. View the content items and observe the pager behavior. The expectation would be the pagenum parameter to be removed for the 1 link like it is for the < and << links. From now, you will not find pagenum=1 when you would like to navigate to the first page of your lists, even when you are hovering over the list item that contains 1 in your pager. Adding OnMessageSendingAsync() protected method There is a new protected virtual method called OnMessageSendingAsync, which is called before you want to send a new email using the STMP service. Now you can define how to configure the SMTP client before sending your message. News from the community Lombiq Helpful Libraries - Resource Management for Orchard Core The resource filter makes it possible to include resources automatically based on the current context. E.g., inject home page styling only when the home page is being loaded., Let's see a quick and simple sample about how you can use it and, what can you do exactly with this filter! Last week we mentioned that our Base Theme for Orchard Core is released, which contains all the foundations to build Orchard themes efficiently with included detailed samples. If you want to quickly try out this project and see it in action, clone our Open-Source Orchard Core Extensions full Orchard Core solution and also see our other useful Orchard Core-related open-source projects! We will clone the Lombiq's Open-Source Orchard Core Extensions repository for this demo as well. We will set up our site using the Blog recipe. After that, you can navigate to Design -> Themes and enable the Lombiq Base Theme and Lombiq Base Theme - Samples themes. You can also make the Samples one as the current site theme. Don't forget to enable the Lombiq Helpful Extensions - Helpful Widgets feature from Configuration -> Features. And now, you can go to the home page of your site and open the predefined blog post that comes from the recipe. You will see that our theme is applied with our stylesheets too, which will apply a different look when the site renders the detailed view of a blog post content item. And here comes the resource filters. To add resource filters the IResourceFilterProvider interface needs to be implemented, and the registration needs to be added to the service collection as well. As you can see here, we used the Always, and WhenContentType methods to define when to inject the stylesheets that we registered using the RegisterStylesheet method. We also have a RegisterFootScript and a RegisterHeadScript method to register scripts that will be displayed in the head or at the foot of the page. If you always want to inject the resource named Site, you can use the Always method. And if you only want to inject the resource named BlogPost when we display the detail view of the BlogPost content type, use the WhenContentType method and provide the BlogPost as the name of the content type. And don't forget to activate the resource filter middleware by adding app.UseResourceFilters() to the Configure method of the Startup file located in a common module or the web project. E.g.: public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider){ app.UseResourceFilters();} If you check out the ResourceFilterBuilder.cs (right side of the screen) you will find any other helpful methods that can be used to conditionally inject resources. Like the WhenHomePage and the WhenPathStartsWith ones, which have self-describing names. For more information, don't forget to check out the readme file about Resource Management. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 253 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!