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

Featured tags

IIS
API
SMS
SEO
All tags >

Elsa Workflows, Orchard Harvest Online - This week in Orchard (02/06/2023)

Thank you, everyone, for taking part in Orchard Harvest Online, and thanks to the presenters for their great presentations! Check out our current post for a short summary of the conference; a demo about Elsa Workflows and many more! Orchard Core updates Admin Dashboard widgets are not scrollable when the content is long Last week we mentioned several improvements regarding the Admin Dashboard and the Admin Dashboard widgets. And we have another improvement for this week too! Currently, the Admin Dashboard widgets are set to hide any horizontal and vertical overflow. This works well when you can control the content of your widget based on specifying the best height/width of each widget. Sometimes you may want to create a widget without being able to control the length. For example, recent contents/posts, most viewed contents, etc. All these examples of a widget with uncontrollable content. In that case, it does not make sense to hide the overflow content vertically. We can still hide the horizontal overflow and the widget since that is something each widget can design for. But the vertical overflow should be set to auto. You can reproduce this behavior easily by creating a widget that lists the last 10 content items and making the size and the width of the widget 1 x 1. That's what you can see on the left side of the screen. And as you can see, when setting the vertical overflow to auto, we get a scroll bar for the widgets when the content is larger than expected. Fix the notifier cookie path Let's say we have an Orchard Core site installed as an application under the default website in IIS. What this means is that we access the site with the following URL: https://localhost/orchard. The problem is that the notifier cookie uses the tenant prefix as the cookie path. For example: For the default tenant, https://localhost/orchard, the notifier cookie path is set to / when it should be set to /orchard. For another tenant, let's call it tenantA at https://localhost/orchard/tenantA, the notifier cookie path is set to /tenantA when it should be set to /orchard/tenantA. Technically, scenario 1 still works, since cookies with a path of / can still be seen by /orchard. Even though the path isn't exactly what it should be, the notification still appears. The problem is in scenario 2, since the cookie path is being set to /tenantA but /orchard/tenantA can't see that cookie, and the notification doesn't appear. After applying this fix, the notification works for tenantA using /orchard/tenantA. Demos Elsa Workflows Elsa Core is a workflow library that enables workflow execution in any .NET Core application. Workflows can be defined using code and using the visual workflow designer. We mention Else here because Elsa is an innovative workflow engine derived from Orchard Core's Workflows module. It was born from a requirement of a project where they didn't want to base it on Orchard Core, but they did want to have Workflows. So, the goal here was to create a reusable designer that you can host/use in your own dashboard application. In this demo, Sipke Schoorstra, one of the main contributors of Elsa shows you everything that you need to know about Elsa Workflows. Head to YouTube for this exciting demo! News from the community Orchard Harvest Online We had the first online Orchard Harvest last Wednesday, and it was so great to see that we had 188 sign-ups for the conference! It was an excellent opportunity to share knowledge, talk about development plans and ideas, and foremost, meet the rest of the worldwide community. The conference was started by a Keynote from Sébastien Ros and followed by a talk from Andrii Chebukin about how you can use Orchard Core Framework for multi-tenancy apps. After that, Zoltán Lehóczky showed us how you can use open-source tools in the following areas: CI builds, static code analysis, unit and UI testing, and telemetry collection. And just before the breakout sessions, you can see a great session by Peyton McManus about why they selected Orchard for their new application. How his team has leveraged Orchard to rebuild and re-imagine the application, and how they will continue to leverage Orchard for their set of features. In the breakout sessions, the attendees had a chance to meet the speakers and other community members. Each speaker had a breakout room where the attendees asked questions and discussed the topic of their talk, or anything else Orchard Core related. After the break, we could see a talk from Hisham Bin Ateya about exploring different parts of localization stuff in Orchard Core. After that, Dávid El-Saig described the Orchard Core Commerce project's state and showed the current features. And the last talk was from Sipke Schoorstra where he provided an overview of Elsa Workflows' features, compared it to Orchard Core Workflows, and discussed integration possibilities. And of course, we recorded every session, which means they will be available on YouTube soon! Don't forget to follow our This week in Orchard newsletter to be informed about the recordings! That was a blast! Thank you everyone for taking part and thanks to the presenters for their great presentations! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 464 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!

Redis connection across tenants, Data Migrations UI feature - This week in Orchard (05/05/2023)

Redis connection across Tenants, simplify email body, and a demo about the Data Migrations UI Feature! Check out our post for the details! Orchard Core updates Redis Connection across Tenants The number of Redis connections scales with the number of tenants. This leads to a large number of Redis connections being required when you have a large number of loaded tenants, even if individual tenants may not have a lot of actual activity. The problem is that when you use something like Azure Redis, you will quickly run into cost issues to allow for enough connections to exist even though Redis is barely being used (CPU/memory usage is very low). If we were able to share the Redis connection pool across all tenants, then scaling would be correlated with the actual usage of the system as opposed to tenant count. From now on, the connection creation was refactored, such that each tenant doesn't have its own connection but you can share the connection to the same Redis instances across tenants. The connection string is the same, and you can use different prefixes for the tenants. The CreateAsync method in the RedisDatabaseFactory class is responsible for returning only one connection, even if there are multiple accesses to the same connection string. Simplify email body Nowadays, when you are trying to create an email message, you should set either Body or BodyText, not only that you also need to set up another property: IsBodyHtml or IsBodyText. This needs simplification to make the setup easier. Furthermore, if someone set IsBodyText to true while they set the Body property, the email will be sent as plain text. So, instead of having two properties to set whether the email body contains HTML formatted text or not, there is a single one, called IsHtmlBody. So, there are no more BodyText and Body properties to set the body of your email. You can simply use the Body one and decide whether the body contains HTML or not based on the IsHtmlBody Boolean property. The IsBodyText and IsBodyHtml properties are also marked as obsolete. Demos Data Migrations UI Feature A few weeks ago, we showed you a conceptabout improving the data migrations in Orchard Core. This time we will check out a new feature, called Data Migrations UI, which allows us to manage the data migrations from the user interface. If you navigate to Configuration -> Features and enable the Data Migrations UI feature, you will find a new option in the root of the admin menu, called Data Migrations. This feature scans and discovers all the migrations from the enabled features and shows them in this list. Here, you can see that we have one migration in the Google Maps feature, which is already migrated. If you click on the Rollback button, you can roll back the given migration. The Migrate button of course runs the given migration. As you can see, the Gravatar feature contains multiple migrations. Migration1 is already applied, Migration2 should be skipped, and there are two migrations that are not applied. If you click on the Migrate button, you can apply the given migration. And as always, if you want to know more about this feature, check out this recording on YouTube! News from the community Orchard Harvest Online 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. Of course, we are still looking for speakers. You can apply to present by 12 May at the following link: https://forms.office.com/e/pfiExtEUuZ. Check out the details on the official site of Orchard Core! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 457 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 Core goes to Oxford, fake video capture source in Lombiq UI Testing Toolbox - This week in Orchard (28/04/2023)

Fix background task description is no longer editable, add validation type for Validation Summary Part, demo about fake video capture source in Lombiq UI Testing Toolbox, and announce that Orchard Core goes to Oxford! Check out our post for the details! Orchard Core updates Fix background task description is no longer editable There was an issue with the Description of the background tasks were not editable. If you navigate to the admin UI of Orchard Core and head to Configuration -> Features and enable the Background Tasks feature, you can manage your background tasks under Configuration -> Tasks -> Background Tasks. The Orchard Core solution contains a module called OrchardCore.Demo. If you add it as a project reference to the OrchardCore.Application.Cms.Core.Targets project, you can utilize this module, which contains a test background task. The Lombiq Training Demo for the Orchard Core module also contains a sample of how you can implement your own background task. Add Validation type for Validation Summary Part In the Validation Summary widget, it is useful to be able to specify the type of summary we want to show. By default, we can show all errors. However, in some cases, we may only want to show a model-level error instead of all. This improvement is about simply adding an option that would allow the user to determine the type of summary to add to the form. By default, it would be all errors. To utilize this feature, you must enable the Forms feature, which provides widgets to implement forms. Now, if you edit a content item with the Flow Part attached (for example, the Page content item coming from the Blog recipe), you can build a simple form. We added a Form widget to this Page with some other widgets, and of course, with the updated Validation Summary widget. As you can see, now there is a Show Model Only Error checkbox, which you can use to decide to only display model-level errors or all errors. Demos Fake video capture source in Lombiq UI Testing Toolbox Maybe you have already heard about the Lombiq UI Testing Toolbox, our web UI testing toolbox mostly for Orchard Core applications. Everything you need to do UI testing with Selenium for an Orchard app is here. We wrote about it several times here as well, first when we open-sourced it, when we added some Orchard Core Features tests to it, when we added the automated monkey testing feature to it, or when we introduced the Visual verification testing. At the end of last year, we showed you the latest updates about integrating UI testing into Orchard Core and the way how you can use WebApplicationFactory. This time, we will check out a slightly different topic! Imagine you have an application that uses video sources to access visual information from the user or the environment using Media Capture and Streams API. The goal can be QR or bar code scanning, user identification, or other computer vision applications. To make sure that future changes to the code do not break anything, we need a way to automate testing. Here, the fake video capture source comes into play. If you check out the documentation, you can see that you can use y4m or mjpeg video files as a fake video capture source in the Chrome browser. In the demo, you can see a virtual business card service where the front end is built by Vue.js, and the back end is of course Orchard Core. If you show a QR code for the application, the back end gives you back a content item, which is a Business Card. This sample can be found in the Lombiq Vue.js module for Orchard Core under the Samples folder. Both of these modules are included in Lombiq's Open-Source Orchard Core Extensions solution, so we will open this solution and find the BehaviorVueTests class where you can find two tests, called QrCardScanShouldWorkAsync and QrCardScanShouldReportNotFoundAsync. The ConfigureFakeVideoSourceForPositiveTest and ConfigureFakeVideoSourceForNegativeTest extension methods are responsible to retrieve mjpeg files, which are embedded resources that we can utilize for these tests. If you run the QrCardScanShouldWorkAsync test, you will see that the test retrieves the information from the QR code and displays the card's content based on the card ID, which can be found in the QR code. And as always, if you want to know more about this new addition to the Lombiq UI Testing Toolbox for Orchard Core, check out this recording on YouTube! News from the community Orchard Core goes to Oxford Zoltán Lehóczky will give an Orchard Core intro at .NET Oxford on the 16th of May. .NET Oxford is an Oxford-based .NET meetup/user group. It'll be online, so you can join from anywhere if you're just learning about Orchard! Check it out here! Orchard Harvest Online 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. Of course, we are still looking for speakers. You can apply to present by 12 May at the following link: https://forms.office.com/e/pfiExtEUuZ. Jump into the following GitHub discussion for the details! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 446 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 updates, fix Bag Part when content type is deleted - This week in Orchard (20/01/2023)

Fix Bag Part when the content type is deleted, add .webp as a default image extension in MediaOptions, Fluid 2.3.1, and updates about the upcoming Orchard Harvest! Check out our post for the details! Orchard Core updates Fix Bag Part when the content type is deleted When you set up your site using the built-in Agency recipe, you will get a content type with a display name Landing Page. This content type has several Bag Parts attached, and by using these Bag Parts you can add several projects, services, team members, etc., to this page which you can use to customize the landing page of your agency. For example, to be able to add services, we have a predefined Service content type. But what will happen if we delete the content definition of the Service content type under Content -> Content Definition -> Content Types? Our Landing Page has a Bag Part that contains Service content items, but now we removed the content definition of that content type. So, if you try to edit the built-in Landing Page content item, you will see the following warnings in the editor (and warning entries in the log file). It means we added three Service content items, but now they have no matching content type definition. Add .webp as a default image extension in MediaOptions Until now, you can't upload .webp images by default. WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters, and web developers can create smaller, richer images that make the web faster. So, .webp should be an extension that is allowed by default, like the rest of the allowed image extensions. If you navigate to the MediaOptionsConfiguration class, you will find the .webp extension here as an allowed file extension by default. Fluid 2.3.1 The latest version of Fluid is 2.3.1, which contains a fix for the TimeZone parsing. Meaning when you use a DateTime with a TimeZone, the DateTime that will be created will also parse the TimeZone. If the TimeZone is not defined, then it will assume it's a local time zone based on the configuration. News from the community Orchard Harvest updates In our previous post, we shared the results of the Orchard Harvest survey, and recently we have just posted it to GitHub too. As you can see from this post, the shortlisted locations in Europe are Lisbon, Amsterdam, Frankfurt, and Barcelona. We have also received offers from Las Vegas and possibly Chicago in the USA. The goal of this post is to emphasize that we are not looking for a venue in the first instance, but for an organizer who can manage the venue and help run the whole thing. If you have any contacts in any of these cities who are specifically organizing events, please let us know! Any help is very much appreciated! If you can offer us a contact or location, we will be happy to arrange further details. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 397 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 about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

Media Theme for Orchard Core, Orchard Harvest survey results - This week in Orchard (13/01/2023)

Fixing that FlowPart's widgets are not indexed in Lucene, migrating the OpenID module to OpenIddict 4.0, demo about the new Media Theme, and announcing the results of the Orchard Harvest survey! Check out our post for the details! Orchard Core updates Fix FlowPart's widgets were not indexed in Lucene FlowPart's widgets were not indexed with Lucene (even with all the necessary settings on the Parts and Indexes). Marco Serralheiro added a FlowPartIndexHandler that is basically a clone of the BagPartIndexHandler to solve this issue. Migrate the OpenID module to OpenIddict 4.0 This is about updating the OpenID module to use OpenIddict 4.0 RTM, which shipped in December. The previous versions - including OpenIddict 3.x - are no longer supported. While OpenIddict 4.x itself has many internal improvements, the "public" API hasn't changed much so the changes here are mostly cosmetic. If you want to know more about the latest version of OpenIddict, check out this great post from Kévin Chalet! Demos Lombiq Hosting - Media Theme for Orchard Core The Lombiq Hosting - Media Theme for Orchard Core repository contains an open-source project which will allow developers to host their themes in the Orchard Core Media Library, including templates and assets. The inspiration came from our public Orchard (Core) SaaS called DotNest. If you don't know it, you can use this site to sign up and get an Orchard (Core) site with two clicks for everyone. We don't vet who is signing up, so it should be safe, and it should be limited. But still, we want people to be able to have their sites as flexible as possible. And of course, there are a lot of built-in features in Orchard for that, you can do a lot from the admin. Part of the things you can do from the admin as well in a limited fashion is theming. There is the Templates module, if the developer or the operator of the application allows it then you can also upload CSS files and do all kinds of tricks. In the end, you can adjust the styling of your website. But we wanted to have something closer to the usual developer experience. And that is pretty much creating a theme for your DotNest site with the help of Media Theme for a tenant in a Saas, and that's what media theming is about. We have documentation about that here which contains a link to the DotNest Core SDK. This is what we will use in this demo! We also have automatic deployments either from the command line or from a GitHub Actions action if you will. You can fork the SDK or can work with an Orchard Core-based solution and create a theme (it needs to use Liquid). When you are satisfied, you can either create an import package by using the .NET Command line tool or, you can use Orchard Core's remote deployment feature to import the package on your production site. Or you can also use our GitHub Actions to deploy your theme. If you would like to try it out in your own SaaS, feel free, and if you have questions, please let us know! If you would like to have a DotNest site and use this feature, just sign up here! And of course, don't forget to check out this recording on YouTube to see the usage of the Media Theme in a site runs in DotNest! News from the community New websites using Orchard Core: the site of Capri Exclusive Homeware and the site of BagPortr Capri's purpose is to provide high-quality homeware to everyone, and BagPortr collects your baggage from your doorstep and checks it onto your flight. Both sites were developed by Gert Smith. 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. 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. Orchard Harvest 2023 survey results For those 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. We created a survey, and now we have the results! Thank you for your feedback so far regarding Orchard Harvest! We have received a significant number of responses so far which has helped us to get a better idea of the right place and time. We have created a Discussion in GitHub where we described the possible dates and locations of the upcoming conference. Mike Alhayek also reached us saying he may have the right contact needed to facilitate the event in Las Vegas. Thanks, Mike! As we move forward, we will keep community members informed of the details, and you will also find every detail in this newsletter too! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 392 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!

ContentElement.OfType extension method, using Pulumi with Orchard Core - This week in Orchard (06/03/2020)

Proposal for new extension method ContentElement.OfType, improved documentation of Orchard Core, UI changes and a demo about how to use Pulumi to programmatically create cloud resources and deploy your Orchard Core application! And finally, let's see the breaking news about the next Harvest! Orchard Core updates Make alerts dismissable in TheAdmin theme Now you can click on a little x at the right-top corner of the alert to close it. Note that this improvement is for the TheAdmin theme. Proposal for new extension method ContentElement.OfType You can iterate over all the properties (let's say parts) of a content item and if this part matches the type you want, then it will let you know. This is a little helper to find the part in the content item or a field in a content part if you know the type that you want. And if there are many of them you will get all of them. For this, you can use the OfType extension method in the ContentExtensions.cs file of the OrchardCore.ContentManagement.Abstractions library. Let's say you would like to get all of the attached PricePart of a content item. In this case, you could do something like this: foreach (var pricePart in contentItem.OfType<PricePart>()){ // } Upgrade blob storage library Upgrading blob storage to use the Azure.Storage.Blobs REST API Client v12 because the v11 client has been identified as not thread-safe, and advice from the Azure team is to upgrade to the v12 library. DataProtection continues to use the old library as it has not been upgraded yet but references it transitively, so we don't need to keep a reference to it. Behavior with regard to directories changes with the REST API Client, so to find directories we now need to enumerate the IAsyncEnumerable with a prefix to see if files exist in the hierarchy. Add create a custom admin theme guide Orchard Core documentation has a new guide explaining how you can add and enable a custom admin theme that uses the TheAdmin as a base theme. Rename ContentField display driver files to resemble class names and conform to conventions Notice that the naming of the DisplayDriver files in OrchardCore.ContentFields was inconsistent and in most cases did not reflect the name of the class within. For example, the HtmlFieldDriver is renamed to HtmlFieldDisplayDriver and the TextFieldDriver is renamed to TextFieldDisplayDriver. Rename GetContentItemIdByAliasAsync into GetContentItemIdByHandleAsync There are methods called GetContentItemByAliasAsync and GetContentItemIdByAliasAsync and these expect a string that is an alias. It can be an alias, but it can also be a slug, an ID or whatever you want. It's like get something by a little name. Based on the prefix of the little name we can find the item. Now these methods have a new name called GetContentItemByHandleAsync and GetContentItemIdByHandleAsync. And the previous methods are now marked as obsolete, so, if you are using these methods, next time you will get a warning message when you build the source code. Validate LinkField URL The validator in the LinkField didn't allow you to use anchor links within the URL input. Now it has been fixed and it's accepting a URL with an anchor. Head to the LinkFieldDisplayDriver.cs and check the code of the UpdateAsync method! Add missing Sender SMTP field and add Author expression editor for the EmailTask Based on the specs, we should be able to set the From and the Sender fields. Today we only ask for From and actually copy it to the Sender. We were missing the Sender field for the SMTP message that we want to send. The sender is optional, it is useful when the email author is different than the email submitter. From now you can use this field when sending an email. And if you are using the Email Task when building your workflow, now there is the expression editor for the From and Sender properties on the task. If you haven't provided the value of the author (in the From field), the value of the Sender field will be used. Sort dropdown widgets alphabetically When having to insert widgets in the FlowPart content editor, the list of all widgets is displayed according to creation date which gets quite messy with a lot of widgets. An easy solution, for now, would be to simply sort the name of the widgets alphabetically to give it some easy structure. So, from now when we list the widgets in the Forms and the Widgets List UI, it's alphabetically ordered. BagPart documentation There is new documentation explaining how to use BagPart in Orchard Core. Here you can also find samples about how to do templating both with Razor and Liquid and what are the available alternates that you can use when working with BagPart. Demos Using Pulumi with Orchard Core By using Pulumi you can programmatically create cloud resources in Azure, AWS, Google Cloud or Kubernetes. In this video, you could see that how does it work in the context of an Orchard Core application, but of course, it works for any website that you want to deploy. It supports the notion of infrastructure as code, that allows you to define your infrastructure literally as code. This is very powerful, because that allows you to create for example your Azure App Service or even a Kubernetes cluster programmatically, so you don't have to do it manually. If you are interested in this demo, don't forget to watch the YouTube video about it! News from the community Breaking news about the next Harvest Based on the ongoing events the best would be to cancel Harvest. Right now there are so many unknowns about the evolution and the spread of the virus. Maybe London will be blocked, maybe Washington will be blocked, we don't know. And by asking about 50 people from everywhere around the world to meet in a closed basement for three days could not be the best idea for know in terms of health. So, Harvest will be postponed until things are settling down. This is the safest choice right now and also the most secure in terms of organization. Orchard Dojo Newsletter Now we have 121 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

Taxonomy and contained content items routing, new options for TitlePart and AliasPart - This week in Orchard (28/02/2020)

New options for TitlePart and AliasPart, adding CodeMirror support for HtmlBodyPart and HtmlField, the Pager shape and demo about the taxonomy and contained content items routing are waiting for you in our upcoming post with many other cool features! And about the news from the community: there is a new Orchard Core website, news about the upcoming Harvest and welcome a new team member in Lombiq Technologies! Orchard Core updates Disable feature confirmation messages When we disable a feature we will get a warning that says that the feature that you would like to disable has dependent features that are enabled. Let's disable the Widgets feature. In this case, we will get the following warning message, because Flows and Layers are built on the Widgets module. New options for TitlePart and AliasPart There is a new setting, called AliasPartOptions. Using this new option you can define that the alias can be editable when editing a content item from the admin UI or make it disabled, which means it will be generated automatically using the defined pattern. And when using the TitlePart, you will also find a new option there, called EditableRequired. This means admins can edit the title of the content item and it needs to have a value because it's required. Html mode for CodeMirror on HtmlField and HtmlBodyPart standard editors CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code and comes with a number of language modes and addons that implement more advanced editing functionality. And now if you set up your site using the Blog recipe and create a new article, the editor of the HtmlBodyPart will come with the CodeMirror support! Furthermore, the Standard editor mode of the HtmlField is also got the CodeMirror support. Moreover, Orchard Core using the latest version of CodeMirror, which is 5.52.0. Pager shape At the bottom of the documentation of OrchardCore.Navigation you will find code examples both for C# and Liquid about how to use the Pager shape in Orchard Core. Add a recipe step to create scope for OpenID Now you can set the connect scope of the OpenID using recipe steps, that you can do in the following way, that could be found in the documentation of OrchardCore.OpenId. There is also a possibility to set the Token Validation Settings with recipe steps. Here you have to provide: Name: unique name of the validation settings. Audience: defines the intended recipient of the token that must be checked. Authority: the address of the remote OpenID Connect server that issued the token. Filter deployment steps There is a new search box on the UI for the deployment steps to filter the list of the available steps. To check out this feature create a new deployment plan under Configuration -> Import/Export -> Deployment Plans then add a new step to it. In this modal window, you will find the textbox with the Filter placeholder text in it. In our case, we typed settings, which means these three steps will be the results of our search. Sitemaps module We wrote about a very cool feature for Orchard Core, which is the Sitemaps support three times now: here, here and here. In every post, we described the features of this module and showed the way how you can use them. And you can also find a recording of this feature on YouTube. The reason why we mentioned that is because this feature is now merged in the dev branch of Orchard Core, thanks to Dean Marcussen! He also added nice documentation about how to create sitemaps, localize sitemaps, cache sitemaps and so on. Setting and Removing HttpContext.Items from Liquid template Now there is a new Liquid filter called httpcontext_add_items, that adds key/value to the HttpContext.Items collection. And you can also remove items from the HttpContext by using the httpcontext_remove_items Liquid filter. You can read more about these two new Liquid filters in the documentation. Do note though that there are possible security implications to this, see the discussion under the pull request. Support most commonly used error pages According to Pingdom research, the top 5 most common errors are 401, 400, 404, 403, 500. So, this is about adding more custom views for error codes that you can change in your themes. Check the content of the DiagnosticsController.cs in the OrchardCore.Diagnostics module. Demos Taxonomy and contained content items routing The main issue is that currently we don't have routing for taxonomies or contained content items. The taxonomy routing is about we would able to route an item inside a taxonomy for a term. The goal is to be able to list all the things that are associated with this term. The issue is that in the case of BagParts or anything that is contained in a content item can't be routed right now, because Autoroute doesn't work on sub-content items. The second thing we looked at was the dynamic routing to be able to define a patterned route in a content item. In this case, multiple URLs would match the same content item and the content item could use these route values to render something differently or do queries. These are two different things, but we are talking about them at the same time. If you are interested in how to do that in Orchard Core check out the following demo on YouTube about this upcoming feature! News from the community A new website using Orchard Core Luxury Card is a global leader in the premium credit card market. From patented metal cards to a 24/7 Concierge service and app, their mission is to shape the industry with innovation, value, and service. With leading airfare and cashback redemption rates along with first-class benefits, they believe your credit card can pay for itself. 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. 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. Freshest news about the next Harvest We have a room booked for the dates June 22-24. This is the reserved interval that we will have for sure now. The maximum people can fit in the room is 50 people. The only concern is that it could be not enough, it would be nice to know how many people are interested in coming to the next Harvest. There will be a questionnaire or something to be able to measure somehow the number of people who could be the possible attendees at the next conference. New team member in Lombiq We have a new team member, Gábor! Turned from English studies to competitive gaming to software development and Orchard Core. Check out his bio on our About us page! Orchard Dojo Newsletter Now we have 119 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

Display mode options to Parts, Search views for themes - This week in Orchard (14/02/2020)

Display mode options to Content Parts, adding search views for themes, import recipe from a JSON file and many other changes and new features come in our current post. After we will see a real-world example about how to use Orchard Core in production. Then check a new website built with Orchard Core and finally let's talk about the latest news about the Harvest! Orchard Core updates Add revision date in the documentation Now each page of the documentation will display the revision date of the current page. Open any page of the documentation and scroll down to the bottom of it. There you will see the date of the last update. Use ControllerModelUpdater on controller instead of implementing IUpdateModel When you want to Build, Update or Validate your model from controllers, you don't have to implement IUpdateModel, because each of them can be resolved by injecting the IUpdateModelAccessor. Here you can see the NodeController, where we need to build the display for the AdminNode using the TreeThumbnail display type (line 74). Instead of passing this, we can pass the _updateModelAccessor.ModelUpdater. Only show fields in Summary and Detail display types In the past, if you added a field (or a few fields) to a blog it's SummaryAdmin view shows in the list of blog posts. That's because the fields are automatically displayed in SummaryAdmin. Now, this feature prevents to display all the fields automatically in the SummaryAdmin. If you check out a driver of a field, you will see that the values of the Location now changed everywhere in the case of the Initialize method. Add display mode option to parts Now we can have custom display modes for Content Parts too! For example, now you could define which tag would you like for the title and the name of the tag could be the display mode of the TitlePart. Fix themes search views fix Changing all the themes to provide a nice view for the search feature. There was a default version of it, but now each theme has it's own and now it looks great in every built-in theme. If you want to change the look of the search form, you would override the SearchForm template, if you would like to override the search results page, the SearchResults template will be the one you are looking for. But of course, you can override the whole look and feel of the search template just by overriding the Search template. Here you could see the Agency theme with the search form and search results. And you could find really great and detailed documentation about how to implement a website full-text search and everything about the new templates. YesSQL: when to call Session.Save? You can call _session.Save(contentItem) as many times as you want, it's free. It's just marking a content item to be saved once the session will be disposed. There will nothing happen when you call _session.Save(contentItem). If you call it multiple times, the first time it will mark it, the second time it will say: It's already in the dictionary of things to be saved. It will be just a dictionary lookup. Call _session.Save(contentItem) when you think the thing should be saved once the session or the request is done. And if multiple things update a content item and you need to tell the session to save it, they can all call _session.Save(contentItem). Import recipe from a JSON file When you are importing a recipe, you have to upload a ZIP file. The logic then extracted that file and found the JSON file in it. From now you can pass a JSON file when importing a deployment package, not just a ZIP. Recipes documentation And if we are talking about that you can import a recipe from a JSON file, we also need to mention that the documentation of Orchard Core has got a great detailed page about the recipes. Here you could see the format of the recipe, the possible steps of the recipe and see samples about each of the steps (Roles Step, Queries Step, Media Step, Layers Step, etc.). RequireUniqueEmail message Now when you would like to register a new user with an email address, that already exists in the system, you will get an error message says that the email is already used. Demos SaaS and OpenID: a real-world example There is a solution called Trivest Connect (an Enterprise Resource Planning application) that currently includes five different companies. One problem that Trivest solves that everybody sends messages to each other and there is no standardization, that is not so optimal. In the use of Trives Connect with many other features there is a standard document format and with that, it is easier to exchange orders, invoices, VIA, etc. Trivest Connect is based on Orchard Core installed with the Software as a Service recipe that is using the built-in Open ID Server. Here you could see that there are really just a few modules enabled in the admin UI. What customers can do is they can send messages to other customers. This is just an administrator portal because, in reality, this is all done behind the scenes in the ERPs. If you would like to see the whole demo of this real-world example just head to YouTube and watch the recording! News from the community A new website using Orchard Core RA Capital Management is a multi-stage investment manager dedicated to evidence-based investing in public and private healthcare and life science companies developing drugs, medical devices, and diagnostics. And they decided to use Orchard Core to implement their website! 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. 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. Latest news about the Harvest There is a new offer from someone from the UK to host Harvest in their offices. They mention 50 people fit in the office. This office is located in London. The possible date for hold the Harvest is the last full week of June. We have to decide the length of the conference and talk about holding a workshop during Harvest. By the past, we have usually done it at the beginning of the week, because this way you can arrive at the weekend, take your time or get back from jetlag or do some tourism. And then if you want you can extend your stay to the week. So 22-23-24 might be the tentative dates. Usually, 2 days are too short and 3 days are too long, but we will see. What do you think about June 22-23? Feel free to comment on that on Gitter too! Orchard Dojo Newsletter Now we have 116 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!

User disabled/enabled events, filter admin menu - This week in Orchard (07/02/2020)

Orchard Core has got several new features and fixes this week! With many others, we will see the new user disabled/enabled events, the new IAreaControllerRouteMapper implementation, the way how you can filter the admin menu then show you a demo about how to integrate stripe.js in your Orchard Core application with workflows. And finally, say some words about a new tentative date and location for the upcoming Harvest! Orchard Core updates Reduce the length of indexes for Content Fields Indexing Let's focus on the LinkFieldIndex and check these two columns: the Url and the BigUrl. The Url is the one that is trimmed and indexed, and the BigUrl is the original data that is not indexed. If you are using MySQL, the maximum length that this provider can support in an index under UTF8 collection is 768. Now we set the maximum length of the indexed columns is to not be longer than the supported length. Do not check "Include all content types" in deployment step by default When you create a content type deployment step, the default is to export all types. Now, this is unchecked by default. Adding User Disabled/Enabled Events The IUserCreatedEventHandler is changed to IUserEventHandler and there are two new events: DisabledAsync and EnabledAsync events. These two new events now triggered in the UserDisplayDriver that will trigger the two newly created workflow events to make it work in your workflows. Adding IAreaControllerRouteMapper Now there is an updated way how the admin prefix is applied by using custom convention and constraint that will ensure that the admin URLs start with the admin prefix. And also ensure that it is done correctly for the controllers that are named AdminController, not the ones that start with admin. Before every controller that starts with admin could be an admin controller, but now with this new convention, it has been decided that only controllers named AdminController can be an admin controller. For example, a controller named AdminItemController doesn't fall into this category, so it can't be an admin controller. A concrete implementation being AdminAreaControllerRouteMapper that uses AdminOptions to provide a default route pattern that is used in the OrchardCore.MVC startup. Just as a reminder, if you have admin controllers you have to name them AdminController or have the Admin attribute on that. This will ensure that the URL is strictly using the admin prefix (or whatever you set it), and the user has the admin permission and this will also apply the admin theme to the views from this controller. Filter admin menu Head to Configuration -> Settings -> Admin and put a tick near the Enable Admin Menu filter checkbox. Now you will have a new textbox at the top of the admin menu with a Filter placeholder text inside it. If you type something here you can filter the menu items and could find easier the option you want. And if you hit CTRL+SHIFT+F, this textbox will get the focus and you can type the menu option that you are looking for without needing to click into this textbox. Add menus content listing and create option If you navigate to the Content option of the admin menu you will find a new one, called Menus. This feature is listing all the menus of the system, and if you can see, there is a new button, called New Menu. By clicking on this button you can create a new Menu without needed the Menu content type to be creatable. Make lists sortable with ordering setting A few weeks ago we write about a way how you can make sortable lists using the Enable Ordering setting of the ListPart and you can also find a demo on YouTube about this feature. The good news is this feature is now merged to the dev branch of Orchard Core! Checkout to the latest changeset of the dev branch and try this feature now. Then don't forget to tell your opinion about it in the comments section! Razor Helpers documentation Now there is a new page in the Orchard Core documentation that contains the extension methods that are available in Razor using @Orchard. This documentation also contains the way how to use an extension method in a view and in a controller too. Demos Stripe.js and Workflows You can use Stripe.js’ APIs to tokenize customer information, collect sensitive card data using customizable Stripe Elements, and accept payments with browser payment APIs like Apple Pay and the Payment Request API. And of course, you can add Stripe.js to your Orchard Core site too! Let's create a registration form where users can register and after successful registration, they can pay the fee for a ticket. After the user submits the form, here comes a huge workflow, that will validate all the fields of the form. Here you can see the several validations, and when there is no error, the workflow will send an email, create an Enrollment in Orchard Core and redirect the user to stripe using a Fork. And there will be another workflow that will validate the payment using the response that Orchard Core will get from stripe.js. Now let's take a closer look at the Create Content Task that creates a new Enrollment content type. When you are creating a new content type using this task, you have to write the properties of the content. This is the JSON that is used to construct the given content item. As you can see, here you can use different Liquid expressions as well, for example, we could use the data coming from the form. You can see the website using this registration form under this URL. Here just click on the Register at the top right and select from the listed options. If you would like to see the whole demo just head to YouTube and watch the recording! News from the community A new tentative date and location for the next Harvest We have another tentative date for the next Harvest: the last week of June. In this date, we could do it in Europe and in a location that is easier to go from the USA too. London and Amsterdam have airports that can be reached easily from several other countries as well. What do you think about the new date and locations? Orchard Dojo Newsletter Now we have 114 subscribers of the Lombiq's Orchard Dojo Newsletter! 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 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!