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

Featured tags

IIS
API
All tags >

Make it possible to add Razor HTML content to the shape as a property, OpenId UI Enhancements - This week in Orchard (23/08/2024)

Make it possible to add Razor HTML content to the shape as a property, OpenId UI Enhancements, and you still have some time to nominate exemplary community members for the Jean-Thierry Kéchichian Community Award. Don't forget that we will have the Orchard Harvest conference in three weeks! Orchard Core updates Make it possible to add Razor HTML content to the shape as a property With this change, you can pass HTML content as shape properties using the <add-property name="propertyName"> child tag helper. The rendered inner HTML will be assigned to the given propertyName. This can be used to easily include complex HTML content in a reusable shape. This is similar to prop-* attributes, but you can also include Razor code as the IHtmlContent property value, which was impossible before. To test this new feature, we will use the Orchard Demo module and go to ~/OrchardCore.Demo/Home/AddProperty. To do that, make sure to reference the OrchardCore.Demo project to your web application. When you are ready, don't forget to enable the feature called Orchard Demo from the admin UI of Orchard Core under Configuration -> Features. Now let's see the code itself! The AddProperty method of the HomeController just simply renders the content of the AddProperty.cshtml file. Here, you can see that we render the EmbedContentInShape shape and pass some properties to it and the properties now can contain HTML content too. As you can see, the property named HtmlContent and OtherContent contains HTML text which is now fully supported. Of course, you can mix and match the different formats, for example, to only use <add-property> when you want to pass HTML content as property. OpenId UI Enhancements There were some changes recently regarding the UI of the Open ID module thanks to Mike Alhayek. You can create Open ID applications under Security -> OpenID Connect -> Management -> Applications. In the Applications list, he sorted the records by application display name. In both Create and Edit views: Moved the field Display Name to be the very first field since that is a UI field. Moved the Client Secret field just below the Client Id. So the order is Display Name, Client Id then Client Secret. Added a way to create a new random client ID and password. Also, a way to copy the values. Localized the Flow phrase. You can create scopes under Security -> OpenID Connect -> Management -> Scopes. Here, he moved the field Display Name to be the very first field since that is a UI field. News from the community Jean-Thierry Kéchichian Community Award 2024 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. It's your turn to nominate a community member! You will find this discussion in GitHub where you can mention somebody who you think has done most for Orchard Core, with a sentence explaining what they've done. Nominations are open until the 27th at midnight, Anywhere on Earth. After that, we'll vote on the nominees secretly. The winner is then announced at the Orchard Harvest conference on the 12th of September. Orchard Harvest 2024 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 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 465 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!

Azure AI Search feature, Lombiq Walkthroughs for Orchard Core - This week in Orchard (02/02/2024)

Use PagerAsync and PagerSlimAsync instead of using the dynamic New, new Azure AI Search feature and a demo about our Walkthroughs module for Orchard Core! Let's see the details! Orchard Core updates Use PagerAsync and PagerSlimAsync instead of using dynamic New Since we have nice extensions for the pager, it is better to use them to reduce the dynamic calls in the code. It's faster to use these PagerAsync and PagerSlimAsync extension methods instead of having dynamic calls to render the Pager and the PagerSlim shapes. Azure AI Search feature Azure AI Search, an AI-powered information retrieval platform, helps developers build rich search experiences and generative AI apps that combine large language models with enterprise data. Implement search functionality for any mobile or search application within your organization or as part of the software as a service (SaaS) apps. And from now on, Orchard Core supports Azure AI Search! Let's see how you can utilize this feature! First of all, you need to enable the Azure AI Search feature under Configuration -> Features. But before enabling the service, you'll need to configure the connection to the server. By default, you can navigate to Configurations -> Settings -> Azure AI Search and provide the Azure Search AI service info. Now, we can create a new index for the Article content type (that is a predefined content type created by the Blog recipe). When creating, resetting, or rebuilding an index, we trigger a job in the background that will upload all existing content items to the Azure AI Search index so the data will become searchable shortly after the action. You can create an Azure AI Search Index under Search -> Indexing -> Azure AI Indices. In this demo, we enabled the Search module to enable frontend search. Then, we used the previously created articles index as the default search index. Head to Search -> Settings -> Azure AI Search and select the articles index. Make sure that the default search provider is the Azure AI Search in the Content tab. If you head back to the default search form URL (~/search) and type something in it to search for the predefined article content item, you will get back the article content item. If you navigate to the Microsoft Azure portal to check out your search service, you will find that the articles index has one document, and the field names are coming from Orchard Core. It was just a quick demonstration of this feature, head to the documentation page of Orchard Core to learn more about it! Demos Lombiq Walkthroughs for Orchard Core This demo is about the Orchard Core Walkthroughs module for teaching Orchard Core fundamentals by guiding the user in step-by-step guides. This walkthrough covers key Orchard Core features, such as content management, user roles, and theme selection, and points users to further learning resources. Now it's time to try out this feature and see it in action! The easiest way is to clone Lombiq's Open-Source Orchard Core Extensions solution. This Orchard Core Visual Studio solution contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries, containing the Lombiq Walkthroughs module too. So, let's run this solution and enable the Lombiq Walkthroughs feature under Configuration -> Features. Now, if you head back to the site's homepage, you will see the first welcoming modal. The module uses shepherd.js, for the walkthroughs, and these modals are rendered by this library. Let's see it in action! As always, if you prefer videos, you can head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 481 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!

Use shape when rendering HTTP errors to allow customization from the UI, Git-hg Mirror is running on Orchard Core - This week in Orchard (01/12/2023)

Use shape when rendering HTTP errors to allow customization from the UI, add extensions for IDisplayManager, and a case study about migrating Git-hg Mirror to Orchard Core are the topics for this week. Let's check them out in detail! Orchard Core updates Use shape when rendering HTTP errors to allow customization from the UI The idea here is that you might want to customize the error pages without having to create a theme. The way to do that is to create shapes. The reason you had to create a theme is these pages were used to be views, so you couldn't override them dynamically. Now (because they are shapes), you can create them in the admin UI and the theme. So, if you want to be able to override the error pages using the Templates feature, now you can do that. For example, if you want to customize the 404 page using Liquid templates, enable the Templates feature, add a template called HttpError__NotFound, and design it how you want it. In this case, we selected the Templates option under Design (enabled the Templates feature first) from the admin menu and clicked on the Add Template button. Here we named our template HttpError__NotFound and provided a sample content. After we clicked Save. The only thing left is to enter a random URL to check out the content of our custom 404 page. You can read more about this enhancement on the newly created Diagnostics page in the documentation. It's a breaking change because if you have customization before, now you have to rename the views or relocate them. This was also documented in the notes of the next Orchard Core release. Add extensions for IDisplayManager This introduces new extension methods for the IDisplayManager that displays a shape using TModel, meaning you don't have to do a new Navbar() for example, as you can see on the screen. The release notes of the next Orchard Core release have also been updated with these changes mentioning how you can add the Navbar shape into your front-end theme utilizing the new extensions. News from the community Case study: Git-hg Mirror is running on Orchard Core Our Git-hg Mirror service can sync between Git and Mercurial repositories, as well as two Git repos. Originally built on Orchard 1, now it runs on Orchard Core! Check out our case study here about the migration! We are happy with the results and the additions to our open-source modules, and stay tuned, as we keep the migrations rolling. If you're considering migrating your Orchard 1 website to Orchard 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! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 488 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!

Introduce a new Navbar shape, Stimata Hotel is using Orchard Core - This week in Orchard (10/11/2023)

Introducing a new Navbar shape, centrally defining media resources, and the brand-new Orchard Core site of Stimata Hotel! Let's get right into the news! Orchard Core updates Introduce a new Navbar shape In the Admin theme, multiple shapes were injected in the Navbar space. We had a zone, that was called NavbarTop, we were injecting the user menu, and then we were injecting a shape for the links. We were creating three shapes, and instead, we now have a Navbar shape, which you can utilize in the Admin theme, in the Theme, and in your own theme. It allows you to utilize drivers to be able to add line items inside that Navbar shape. That makes things more dynamic. Like injecting a theme toggler, the icon that navigates you to the front-end site, the culture picker, etc., can be done by using the driver. You can read more about it by visiting the docs, and the change logs of the upcoming Orchard Core version are also updated to tell you some more details about it, for example, how you can add the Navbar shape into your own front-end theme and back-end theme. Centrally define media resources This change is about centrally defining media resources to avoid scattered file references. The script and the CSS files needed for the Media-related fields and parts (Html Body Part, Html Field, Markdown Body Part) were always injected in a way where we defined the source and the dependencies of the required resources. By adding these resources to the ResourceDefinition, we can easily inject them just by using their name. News from the community A new website using Orchard Core: Stimata Hotel Stimata Hotel is nestled in Flampouria, a charming coastal nook on the western side of Kythnos, captivating with its sandy beach and the mesmerizing sunset over the deep blue sea. Check out their brand-new, amazing-looking Orchard Core site here! If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. Ryan Drew Burnett started it, but since he doesn't work with Orchard anymore, as announced earlier, it is now maintained by our team at Lombiq Technologies. Oh, and in case you haven't read our previous post yet, Show Orchard is now running on Orchard Core! Here's the case study about how we migrated it from Orchard 1! 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! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 484 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 media file settings for allowed file types, Lombiq’s Journey with WTW’s Client Portal - This week in Orchard (29/09/2023)

Make UserMenu and LoginMenu extensible to using drivers, add media file settings for allowed file types, and a blog post about Lombiq’s Journey with WTW’s Client Portal! Let's see the details in our post! Orchard Core updates Make UserMenu and LoginMenu extensible to using drivers Currently, there is no easy way to extend or inject items in UserMenu and LoginMenu. This is because all items in there are hard coded. If you remember, a few weeks ago we talked about the User Display Name and the User Avatar features, and in the recording, Mike Alhayek showed how difficult it is to change the UserMenu or LoginMenu shapes. The suggestion was to make these shapes extensible. From now on, to inject new menu items in either the LoginMenu or UserMenu you can implement and register an implementation of DisplayDriver<UserMenu>. The Detail display type is used to create the front-end menu, whereas the DetailAdmin is used to create the admin menu. Here you can see screenshots from TheTheme theme and from TheAdmin theme. As you can see, every menu item has its own shape which makes extending the items of these menus way more flexible. Add media file settings for allowed file types Currently, when using Media Field, there is no way to restrict which file types can be used. Any extension that is uploaded can be selected. This works great for the most part. But what if you want to allow specific types? For example, creating a slide show of some sort. You should not be able to select non-image files for a slide show. Having a way to specify image extensions will help in this case. And here comes the new settings! Here, you can see that we have a content type called Slide Show Item. This content type has a Media Field attached, called Pictures. If you edit the Pictures Media field, you have a way to set the allowed media types (image types for our case) by using the image types checkbox which helps you to select all the file extensions with the "image" type. With the help of this friendly UI, you can easily say that you only allow users to upload images using the Pictures Media Field. Note the list of the extensions here comes from existing MediaOptions. News from the community Lombiq’s Journey with WTW’s Client Portal WTW is a multinational company providing services, such as insurance brokerage, risk management, and human resources consulting. Recently we implemented a specialized Orchard Core Client Portal for them. It was an exciting project, and we delivered it on time. While the final steps on the rest of the architecture are being completed, the whole portal is gradually being rolled out to users during the summer of 2023. If you are interested in the details, check out this case study for more! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 499 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!

Orchard Harvest Program, Tenant Clusters - This week in Orchard (19/05/2023)

Allow displaying an icon for Custom Settings, add Admin Culture Picker docs, demo about Tenant Clusters, and most importantly, the program of the Orchard Harvest is now available! Let's get started! Orchard Core updates Allow displaying an icon for Custom Settings You can create a setting using Custom Settings and set the item icon in the menu that came with it. It wasn't really possible before this change because the .Id(type.Name.HtmlClassify()) and .AddClass(type.Name.HtmlClassify()) weren't applied in the AdminMenu of the CustomSettings module meaning it was not possible to override this menu item with a shape named NavigationItemText-NAME_OF_SETTINGS.Id. From now on, the CustomSettings module allows us to set the icon of the newly added menu item. Add Admin Culture Picker docs A few weeks ago, we mentioned that you have the option to add an admin culture picker for the admin site and have a dropdown in the admin panel header to switch languages. And of course, when adding new features to Orchard Core, we always keep in mind the flexibility and the reusability that Orchard Core can provide to the developers. Meaning, you can override and customize the shapes which are responsible to display the admin culture picker. Now we have some lines in the documentation about the two shapes that are responsible for displaying the admin culture. Demos Tenant Clusters This demo is about a work-in-progress feature for Orchard Core that distributes requests across tenant clusters using Microsoft Yarp.ReverseProxy. If you check out the following recording, you can easily get up to speed with the current state of this upcoming feature. Here we want to highlight some of the more exciting parts of this addition: We first use the Yarp Configuration to define Routes and Clusters with many options. Each Route is tied to a Cluster composed of Destination(s) on which load balancing can be applied. We only need one catch-all RouteTemplate and multiple Clusters on which we can configure a custom SlotRange[min, max] property (up to 16384 slots). Each tenant has a unique slot hash, so a unique Slot then belongs to the Cluster having the slot in its SlotRange. The Cluster can have multiple Destination(s). We could have used a Cluster having Nodes, but we follow the Yarp Config having a Clusters list of Cluster type. The same application can run as a proxy or behind it (we check the headers), the advantage with our distributed services is when as a proxy we are still aware of all tenant's data. So, on a request, we can use the same RunningShellTable to know the tenant, then select the right Cluster based on the tenant slot hash (in a custom middleware), and let Yarp selects one of its Destination(s). To compute a tenant slot hash, we use the CRC-16/XMODEM algorithm (same as Redis uses for clustering keys) applied on the new TenantId property, which allows us to automatically spread out new tenants on the slots and then on the configured Clusters. This knowing that the CRC-16 is fast to compute and always returns the same number for the same TenantId, so a tenant stays on the same Cluster. News from the community Orchard Harvest Online Program As many of you know, we have been working hard over the past months to organize the next Orchard Harvest in Las Vegas after the last Harvest in 2017. Unfortunately, based on the current economic situation and personal feedback, Las Vegas won’t work this year. Not to mention that unfortunately Microsoft Build, announced after we decided on our dates, also falls in line with the original dates we chose. So, a date change was also necessary. However, we did not want to let go of this opportunity to meet completely. Therefore, we are pleased to inform you that we will be holding our first online Orchard Harvest starting on the 31st of May at 13:00 UTC. You can start your registration for the event right now. And in the meantime, the program of the conference is available on the official site of Orchard Core! Please welcome the below selection of awesome talks by community members! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 458 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 fallback alternate when a custom stereotype is used, tenant removing - This week in Orchard (16/09/2022)

Add fallback alternate when a custom stereotype is used, validate database connection before allowing a tenant to be added or set up, remove localization workaround in Data Annotation Attributes, and a demo about the upcoming tenant removing feature! Check out our post for the details! Orchard Core updates Add fallback alternate when a custom stereotype is used The idea here is that when you create a stereotype, before this change, you had to create templates for this stereotype if you intended to display or edit items of this stereotype. And now, there is a fallback shape for stereotypes such that if you don't create custom templates, it will use a standard, default template that is valid for any stereotype. How it works is just to let's use the Content shapes for anything when we don't have a custom template. It prevents showing error messages when you create a stereotype and try to create a content item from this stereotype. And you can test this one easily. Just navigate to the admin UI of Orchard Core and head to Content -> Content Definition -> Content Types, where you can find the Create new type button to define your new content type. Add a name to it and hit Create. We will not add any Parts to it right now. Set the Stereotype to Cat and hit Save. Now we can create a new Animal content item by clicking on the New button and selecting Animal under Content -> Content Items. And as you can see, Orchard Core now renders the default Content_Edit template as a fallback instead of throwing an exception. Validate database connection before allowing a tenant to be added or setup When adding a new tenant, we allow the user to set a prefix to the tables to enable reusing the same database for multiple tenets. However, we don't validate that the prefix isn't already used first. The problem with this is that it throws an exception. Let's say we have a tenant with a URL prefix test and we selected the SQLite database. Now let's create another tenant using the same URL Prefix and database preset. As you can see, now we have a validation error. But we also have validation for connection strings as well. Let's say we would like to use SQL Server and provide a connection string that is invalid. In this case, you will face an error like "The provided connection string is invalid or server is unreachable". Remove localization workaround in Data Annotation Attributes Two years ago, when Hisham Bin Ateya started the support data annotations PO localization PR, there was a long discussion to support localization in data annotations. Back in the day, Antoine Griffard did a workaround to achieve the goal by using IValidatableObject, and now it's time to remove this workaround and use the new way of doing this. This means we can remove the need of implementing the IValidatableObject from several ViewModel. And from now, on you can use some attributes which help you print localized error messages. And now there is an attribute for email validation and URL validation as well. Let's see an example quickly! As you can see here, the RegisterViewModel implemented the IValidatableObject to be able to validate the properties inside the class. Now, instead of using the IValidatableObject, we can add attributes to these properties, and here comes the new EmailAddress attribute as well. As you can see from the screen, the new implementation of the ValidationAttribute can be used to validate your model by returning a localizable error message. Demos Tenant Removing The option to be able to remove tenants is a long-requested feature, and for now, we are very close to shipping this feature, thanks to Jean-Thierry Kéchichian. Let's see how it will work! For this demo, we will navigate to GitHub and checkout this branch. Now, let's add some tenants to be able to try out this feature. As you can see, we have added 3 tenants. The Agency and the Blog ones are tenants that we have already set up, but the tenant called test is waiting for setup. Here you can see that we have the Sites folder under App_Data where each of the tenants has its own folder containing the Media files for example. And now we also have a wwwroot folder under OrchardCore.Cms.Web, which contains a folder per tenant like in the previous case. This means now each tenant can manage their own cached files under wwwroot. When we remove a tenant, the logic will also remove the folder of the tenant under the wwwroot and the Sites folders. And now it's time to delete a tenant! To be able to delete a tenant, we should disable it first, which means it will be not served, and we will be able to compose an internal ShellContext with all the features that the tenant has, even if it is installed or not. You can also remove multiple tenants by using bulk actions. And this is just the surface, there are still some things to do. If you would like to see the current state of this feature and do a deep dive under the hood, check out this recording on YouTube! This feature is sponsored by Lombiq. News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 347 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!

Implementing Zone shape alternates, Lombiq UIKit for Orchard Core - This week in Orchard (25/08/2021)

We can write about several nice improvements this week! Adding missing deployment steps, new strongly typed example with update endpoint in the documentation, implementing Zone shape alternates, and many more! Orchard Core updates Implementing Zone shape alternates This feature is about adding Zone shape alternates like in Orchard 1. The Zone__[ZoneName] template is called when displaying a Layout zone. Which zones are available depends on the current theme. And now you can find a new section in the documentation of Orchard Core about what are the available properties of the Zone shape and how to display the content of a given zone using Liquid and Razor. Allow file attachments for deployment steps Let's say you need to create a custom deployment step that accepts an Excel file as an input with data to use for creating a custom deployment step. But the form posted does not accept attached files. The issue was that the OrchardCore.Deployment/Views/Step/Edit.cshtml file has no enctype="multipart/form-data" attribute. Expanded strongly typed example with update endpoint The Content Types page of the Orchard Core documentation is about showing you how to use migrations to create your new content type, how to change the metadata of your content type, or how to add content parts or content fields to your type. Now there is a new sample that shows how to update your strongly typed content item using an API in this case. The UpdateProductPriceAsync is just about getting the Product content item by an Id and updating the value of the Price Numeric Field of it, which can be found on the ProductPart. Add site settings deployment for Content Audit Trail Settings and Google features When you navigate to Configuration -> Features and enable the Audit Trail module, you will have a feature that provides a log for recording and viewing back-end changes. If you navigate to Configuration -> Settings -> Audit Trail and click on the Content tab, you will see a list that contains all of the content types of your installation. Here you can select the types of content whose events are recorded. And now you can export these settings using a deployment plan! To do that, just create a new deployment plan (Configuration -> Import/Export -> Deployment Plans) and add a new deployment step to it. You just need to find the Content Audit Trail settings one that exports the content audit trail settings. If you execute your deployment plan, you will see that the recipe file contains the list of the allowed content types. And the same goes for the Google Analytics and Google Tag Manager modules. If you enable those, you will find some settings under the same Configuration -> Settings option called Google Analytics and Google Tag Manager. Now you just need to add the Google Analytics Settings and Google Tag Manager Settings deployment steps to your plan, and after you execute that, you will get the following recipe file. Demos Lombiq UIKit for Orchard Core The Lombiq UIKit for Orchard Core module contains reusable shapes like text editors, custom-style checkboxes, dropdown editors, and in the future potentially more complex editors. Add the module to your solution and enable the Lombiq UI Kit - Showcase page feature if you want to check out the currently available shapes. You can see them under ~/UIKitShowcase after the feature is enabled. The example code for using these shapes can be seen in Views/Showcase/Showcase.cshtml. This module contains only those stylings which are needed for these shapes to work. During one of our client projects, we needed to standardize UI elements both on the front end and the admin area. Like text fields, drop-downs, and so on. Once you go beyond the very basics with styling and functionality this comes a bit more complex. Centralizing things is a good option in this case, and while we are doing that let's have an open-source module about it. And we have already added this module to our Open-Source Orchard Core Extensions solution! The only thing you need to do is to clone this repository and set up your Orchard Core site with any recipe you want. After head to the admin UI of Orchard Core and enable the Lombiq UI Kit - Showcase page and Lombiq UI Kit modules. Now you just need to navigate to the https://localhost:44335/UIKitShowcase URL, which showcases all the elements that are built-in into the module. But how can you use these? Especially they are just simple tag helpers. If you open the mentioned Showcase.cshtml in the Lombiq.UIKit module, you will see the content of the showcase page. Here you can see we have the editor tag helper that accepts several properties like the type, labelPosition, iconClasses, placeholder, and so on. By just providing these you can have nice, standardized UI elements that can be also used in Liquid as well. If you would like to know more about this feature don't forget to check out this recording on YouTube! News from the community DotNest Core DotNest Core is a complete redevelopment of the DotNest platform, all on the latest version of Orchard Core. We've been running it with a couple of select few customers for a while now, and it's time to open it up a bit more. While you can't yet simply create an Orchard Core-based DotNest site, you can sign up for our limited beta here. You'll soon be able to get a fully functional, reliably hosted Orchard Core site on DotNest where you can build your personal website or something to showcase your Orchard skills with. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 219 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 week's Orchard meeting!

Audit Trail module UI improvements, new User Event Handlers - This week in Orchard (29/06/2021)

Improving the UI of the Audit Trail module, new user event handlers, feature to lock-out users on wrong password, and many more additions to Orchard Core in our current post! Orchard Core updates New User Event Handlers You can already work with several user event handlers. Let's say you want to do something after a user is created. For example, after a user has been created, I would like to send a welcome email to that user. And from now you will find more events if you open up the IUserEventHandler interface in the OrchardCore.Users.Abstractions module. Like now you can implement the CreatingAsync method, which occurs before a user is created. Or you can use the UpadatingAsync or UpdatedAsync events too! ListPart shape names for placement The issue is that placement doesn't take into consideration the display type convention, i.e. _SummaryAdmin when placing shapes, so the convention for shape names fails, and placing a ListPart shape tries to collect all three shapes, and render them. Fixed whitespace parsing in output tags in Fluid Let's say you have the following Liquid expression which is totally a valid one: {{ "foo" | size }} But what if you write this expression in the following way {{ "foo" | size}} it would say a parse error. But from now, if you have only one expression in different lines, the parser will work as expected. For example, now you can do something like this, this will be valid: {{ "foo" |size}} Lockout on wrong password The Lockout settings are set with the settings configured in ASP.NET Identity. Those options are used to define, for example, the TimeSpan a user is locked out for when a lockout occurs or the number of failed access attempts allowed before a user is locked out. So, from now you can define the logic where you want users to be locked out and you can also set how long you want to lock out that user after how many failed access. And if you check out the documentation you will find some lines about how you can read the configuration from an external config file. Here you can say that we want to allow this feature for every new user. And if they provide a wrong username or password 5 times a row, we lock out them for the next 5 minutes. And you also have an option to unlock users from the admin UI right away. If you navigate to Security -> Users you will find an Unlock button if the given user locked himself out. As you can see in the screen below, the user with the editor user name is a locked-out one. Adding docs for the absolute_url and href Liquid filters The page about the Liquid module in the documentation is a super-useful one because here you can see the list of all the available Liquid filters that you can use in Orchard Core. And now this page got an update by adding the absolute_url and href Liquid filters to it. The absolute_url creates the full absolute URL for the given relative virtual path and the href creates a content URL for a relative virtual path. Recommended for generating URLs in every case you want to refer to a relative path. Demos Audit Trail module UI improvements The Audit Trail module provides log records for creation, deletion of any content type, and events like user events. We wrote about the Audit Trail module for Orchard Core in this This week in Orchard post, if you haven't read about it yet, start by checking out that one first. Now, we will focus on the new UI. First of all, set up your site using the Blog recipe. After, head to the admin UI of your site and enable the Audit Trail and the Users Audit Trail features under Configuration -> Features. Audit Trail: Provides a log for recording and viewing back-end changes. Users Audit Trail: The users audit trail feature allows logging of user events. Now you can set up the Audit Trail module that you can do under Configuration -> Settings -> Audit Trail. Here you will see 3 different tabs: Events, Trimming, and Content. Under the Events tab, you can select what kind of events you would like to record. For example, you can say that I want to record the fact when an attempt to login failed, but I don't care about the event when a user was disabled. Under the Trimming tab, you can say how long you want to keep your records in your database. You can say that I want to keep the records for 30 days and delete the older ones. The Content tab is about setting the types of content whose events are recorded. If you don't want to log the changes for a given content type, you can just simply untick the given one. Let's say that now we want to log the changes of every content type. We need to do some changes to be able to see records in the Audit Trail list. Let's just modify the built-in blog post. Don't forget that you still have the Audit Trail Part that you can attach to any content type. If you do that, you can optionally provide a comment about this change for the Audit Trail. Now, let's open up the Audit Trail to check out our changes. As you can see here, we published the built-in blog post two times in a row. We also published the built-in About article but for this time, we attached the Audit Trail Part too. The content of the part (the comment) can be seen under each event. Also, notice that the user with the editor username has two failed login attempts. Now, let's hit the Details button near one of the content events. The Content tab here shows you some basic data about the event: the name of the event, the timestamp of the event, the current version, and so on. You can see the JSON representation of the content item under the Diff tab. Here you can choose between two types of views: Split: the content of the previous version can be seen on the left side of the screen and the content of the selected version can be seen on the right side of the screen. You can see the previous, changed data in red and the current, modified data in green. This screen shows that the ContentItemVersionId has just changed with the ModifiedUtc and the PublishedUtc values. The reason for that is we changed the Markdown text of the blog post, by adding a new paragraph to it. Unified: the meaning of the colors is the same here, the only difference is that you can see the whole changes in one view, instead of a split one. You will see a whole new user experience when you would like to list or sort the events in the Audit Trail list. Last week we wrote about the improved search filters to the contents and users list where you could read about the syntax for the filters. And slightly the same applies here too. If you click on the funnel icon before the search box and select the Filter Syntax one, you will see a modal window that shows you the available filters. This modal describes all the registered filters that you can use with the given properties. It also shows you the current values of the given filters and a little bit of information about the syntax. And then down the bottom, you just get the current filter and the normalized version of it which describes how it's being constructed. And as always, if you would like to see more about the new UI of the Audit Trail module in action, head to YouTube for a nice and detailed recording! News from the community Piotr Szmyd Last Tuesday June 22nd 2021, our dear friend Piotr Szmyd passed away. Piotr was a respected member of our community, a steering committee member, and a passionate contributor. Everyone loved him. By creating this issue we hope you can share a story or a thought to help keep his memory alive and show his family and his friends how much he meant to us. This picture was taken in LAX on September 2012 on the way to the first Orchard Harvest conference ever. From left to right: Zoltán Lehóczky, Benedek Farkas, Piotr Szmyd and Sipke Schoorstra. May our branches merge again, Piotr! Lombiq Helpful Extensions: Flows Helpful Extensions The Lombiq Helpful Extensions module is an Orchard Core module containing some handy extensions (e.g. filters for Projector). This time we will see the Flows Helpful Extensions which adds additional styling capabilities to the OrchardCore.Flows feature by making it possible to add classes to widgets in the Flow Part editor. But how can you use the Flows Helpful Extensions feature? Let's say you have a site set up with the Agency recipe. The first thing that you need to do is to navigate to Configuration -> Features and enable the Flows Helpful Extensions - Lombiq Helpful Extensions feature. Now, it's time to edit a content item that has a FlowPart attached. The Page will be great for us now. Let's say we add a new Html widget to the FlowPart of our new page. If you click on the new cog icon, you can add custom classes to this widget and remove the grid extension classes that will be added to your widget by default. OK, but what does it mean? What's the difference? The right side of the screen below shows you the original HTML and the one on the left shows you the modified one. As you can see, the my-custom-class CSS class is there and the widget-size-* and widget-align-* classes were removed because we put a tick on the Remove grid extension classes checkbox. Removing these classes is a good idea if you are using a CSS framework that adds CSS properties to these classes but you don't want to add styling to these elements based on these classes. In this case, you don't need to overwrite these properties. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 205 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 week's Orchard meeting!