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 >

Drop support for .NET 6 and .NET 7, All users and Custom User Settings deployment steps - This week in Orchard (24/11/2023)

SMTP should send the email if the SSL certificate is invalid, new All users and Custom user settings deployment steps, and drop support for .NET 6 and .NET 7 are the topics for this week. Let's check them out in detail! Orchard Core updates SMTP should send the email if the SSL certificate is invalid Mailkit supports sending emails when the server's SMTP certificate is invalid. Now this function is integrated into Orchard Core. You have the choice (with a check box from the mail server settings in the admin area) to be able to bypass the invalid or self-signed certificate. So, there is a new property called IgnoreInvalidSslCertificate that you can set to true in the settings, such that if the SMTP server certificate is not valid, then you might not care and just send the email anyway. To find this setting, don't forget to enable the Email feature. After that, you can navigate to Configuration -> Settings -> Email, where you can find the Ignore Invalid SSL Certificate checkbox. All Users and Custom User Settings deployment steps Now, we have two new deployment steps to export every user and to export all, or specified custom user settings. These steps contain the user's name, user ID, email of the user, password hash, security stamp, phone number, and all the important things and the custom settings of the users. And it's safe because it's a password hash, and the data protection key that created this hash is secure. If you navigate to Configuration -> Import/Export -> Deployment Plans, you can create a new deployment plan. If you click the Manage Steps button, you will find the Add Step button, which helps you to add deployment steps to your plan. If you filter on the user keyword, you will find these new steps. Drop support for .NET 6 and .NET 7 The latest LTS version of one of the world's leading development platforms was released on November 14, 2023. And Orchard Core now supports .NET 8! It also means that the upcoming version of Orchard will not support .NET 6 and .NET 7. Our practice has always been to support the latest LTS version of .NET, and additionally, the latest version if it's different. Dropping older versions allows us to use new features from .NET 8, and drop packages that are not required anymore (like NewtonSoft.Json). It should be as easy as updating the target framework in the websites that decide to upgrade to the next Orchard Core version. If you head to the documentation of the upcoming Orchard Core release, you will notice this breaking change there as well. News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 486 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 a way to restart an instance of a workflow, Http Redirect to Form Location Task - This week in Orchard (17/11/2023)

Thumbnails for the media library, add a way to restart an instance of a workflow, and a demo about the Http Redirect to Form Location Task! Let's get started! Orchard Core updates Thumbnails for the media library In the media library, there are new icons and thumbnails for well-known file types using Font Awesome icons. Here, you can see the assets provided by the Blog recipe. When you are uploading a PDF or an XLXS file, you can see the new icons instead of the old ones. Add a way to restart an instance of a workflow Sometimes, a workflow instance can fail for some reason, for example, we have a workflow that sends an email and fails. It would be helpful if we could restart the instance. This change adds a button next to the Delete button named Restart. This takes the current workflow state and restarts it. As you can see here, we have a workflow called test with one faulted instance. If we hit the Restart button near the faulted instance, it creates another instance that can run successfully. To do that, there is a new RestartWorkflowAsync method in the IWorkflowManager interface, which starts a new workflow using the specified workflow definition. Each type of activity can implement custom logic when a workflow instance has been restarted because sometimes it needs to load some extra state. This can be achieved by implementing the OnWorkflowRestartingAsync and OnWorkflowRestartedAsync methods. For example, the ContentActivity now stores the content item version ID of the content item that triggered the workflow. It means when you retrigger a workflow, you can use the same version of the content item that you were dealing with before. Demos Http Redirect to Form Location Task This feature allows you to be able to put a form on a page and then somehow redirect back to that same page where we came from using a workflow. We already have a workflow task that allows us to redirect the user to a specific location, which is great if you know where you want to go back to. Like, if you want to go back to the home page, then you can always redirect the users to the home page. But what if you want to reuse the same workflow for multiple forms (or reuse the same form on multiple pages) and then when the user submits that form, go back to where they submitted the form from? There is no way to do that right now and that's where this demo came from. How can we redirect the user back to the page where they came from? Now let's create two forms, called the Q&A form and Contact Us, it doesn't matter right now. The thing that matters is they are both using the same URL to submit the form. So, we will have one workflow that will do something, then it will redirect the user back to the source form. Here, you can notice a new checkbox called Save Form Location. If we want to redirect the user back to this form, it's required to put a tick into this checkbox to store the location of the form. It's time to create our workflow! Here, you can see that the starting task of our workflow is an Http Request Event, followed by a simple Notify Task. The last task is a new one, called Http Redirect To Form Location Task. The last remaining thing to do is to set up our activities. As you can see, the Http Request Event has a new textbox with a label Form Location. It serves as a key that will be added as an entry to the dictionary of re-hydrated values provided to the initiator of the workflow, the Output of the WorkflowContext. Meaning we store the location of the source form under this key in the dictionary. As you can see, we need to use this key for the Http Redirect To Form Location Task as well. In a nutshell, the Http Request Event stores the source form's URL in a Dictionary with the provided QAContactUsFormLocation key, and the Http Redirect To Form Location Task will read the entry from the dictionary where the key is QAContactUsFormLocation. It allows us to store the location of the source form. And as always, if you would like to know more about this new feature, head to YouTube for a recording! News from the community Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 485 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

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!

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

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

Upgrade to Bootstrap 5.3.2, periodic Orchard Core Workshops - This week in Orchard (27/10/2023)

Upgrading the Admin theme to use Bootstrap 5.3.2, displaying the Orchard Core logo in the HTML head in Admin branding, and a discussion about having Orchard Core Workshops again! Check out our post for the details! Orchard Core updates Upgrade to Bootstrap 5.3.2 Orchard Core is now using Bootstrap 5.3.2, which is a major upgrade because the previously used version of Bootstrap was Bootstrap 4. Most of the assets of the Admin theme were reinvented to make them compliant with Bootstrap for many reasons. One of them is the maintainability because we don't have a lot of overrides so we tried to code along instead of going against Bootstrap. If the next version of Bootstrap is released, it will be easy to update Orchard Core to use that version. This version of Bootstrap supports themes. There is support for dark and light themes; you can also add any other theme you might want. If you want to add a blue theme, you can achieve that using Bootstrap 5.3.2. Previously we used to have our own dark mode and default theme. So, those now are supported by Bootstrap. Because of this reason, one of the breaking changes is we no longer use the phrases: theme, dark theme (from the Bootstrap perspective). It is now called dark and light. And by default, we use auto. What auto does, is it automatically honors your preferences. This means that if you are using a dark theme on your phone, your Orchard Core website will load dark by default. Another improvement is separating Bootstrap from the Admin theme assets. Before the admin.scss used to include Bootstrap within it. And also, admin.js used to include Bootstrap within it. It means we complied them together, and we shipped them that way. With the new layout, we separated the two. The admin.scss or the admin.js are much lighter files but they are loaded after we load Bootstrap. The benefit of that is our code is completely independent of Bootstrap. If you open up the source code of Orchard Core and check the files inside the TheAdmin theme, you will notice one main file under the Assets/scss folder, called index.scss. Here we import some main stuff and the necessary components. At the end of the file, you can see that we are including the light and the dark themes. If you need to add your custom theme, you can include it as we included the dark theme for example. If you check out the _index.scss file of the dark theme (under the scss/themes/dark folder,) you can see how we utilize the color-mode function to create a scope for the dark theme. And only do these overrides and make these changes when it's dark. You can do the same thing for your theme. Displaying the Orchard Core logo in the HTML head in Admin branding By default, the Orchard Core logo and site name are displayed in the top navbar in the admin theme. In this change, the favicon is surrounded by zone "HeadMeta" to put it in the HTML head. The documentation is also updated to reflect this change. News from the community Periodic Orchard Core Workshops As you may remember we had a couple of workshops before in 2020. They were about various aspects of Orchard Core, including the built-in modules or the most important part of the built-in modules and how to use them, theme development, module development, deploying to Azure, etc. We think that those workshops were very useful for the community and we should do that often or at least periodically, like twice a year. Just have this as an easily accessible way of getting a bit of personalized Orchard Core training. Because we have tutorials and videos, so, currently if you want to learn on your own, you can do that from those or the code. If you want personalized training, you can get in touch with any community member or Lombiq and get one. But kind of in between, there is nothing, there are no open courses, classroom-kind courses that you can just sign up and be there with multiple people. If you are interested, jump into this GitHub discussion and tell us your opinion about this idea! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 489 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 1.7.1 and Orchard Core 1.7.2 - This week in Orchard (20/10/2023)

Orchard Core 1.7.1 and Orchard Core 1.7.2 have been released to address some issues of the 1.7.0 release. In our current post, we will check out everything that you should know about the latest release of Orchard Core! Check out our post for the details! Orchard Core updates Fix workflow page list issue when using PostgreSQL When a new Orchard Core 1.7 application using PostgreSQL is started, the Workflow page (/Admin/Workflows/Types) gives an error when opening. This error happened after upgrading a 1.6 project using PostgreSQL to 1.7. If you did a clean installation via the Orchard Core repo, you encountered this error again when using PostgreSQL. If you are using SQLite, this problem does not occur. The issue was in the following query that caused problems with PostgreSQL: "SELECT DISTINCT WorkflowTypeId FROM \"WorkflowIndex\"" After the fix, the query looks like the following: "SELECT DISTINCT \"WorkflowIndex\".\"WorkflowTypeId\" FROM \"WorkflowIndex\"" Set index length limit for MySQL Multiple exceptions were thrown when you started a new MySQL-based instance of Orchard Core 1.7, and of course, the expected behavior is to start the application successfully without any exception. The issue was the following. An index entry in MySQL can't contain more than 3072 bytes. With the current default utf8nb4 collation, this accounts for 768 chars. This means that all the fields that make up an index entry can't go over that, but only in MySQL. MySQL has a custom syntax to define the prefix size of an index, meaning the amount of data to use for each field. For instance, we can limit the Alias field size in the index with CREATE INDEX ... (DocumentId, Alias(50), ...), and then it would only take the first 50 chars even if the content is bigger. This way, we can have limits on the content itself, MaxAliasSize, but a distinct max size for the index. And we wouldn't need to constrain the field size to the index size for MySQL. In YesSql the columns names are injected as-is in the SQL Query:https://github.com/sebastienros/yessql/blob/c0771eb555c67bf419859016cb3563a3540fe7c7/src/YesSql.Core/Sql/BaseComandInterpreter.cs#L233 So, if we change the current migration to something like this, this would work as long as the sum of these constraints is less than 767 chars. SchemaBuilder.AlterIndexTable<AliasPartIndex>(table => table .CreateIndex( "IDX_AliasPartIndex_DocumentId", "DocumentId", "Alias(123)", "ContentItemId", "Published", "Latest")); News from the community Orchard Core 1.7.1 and Orchard Core 1.7.2 Orchard Core 1.7.2 was released a few days after the 1.7.1 one to address some issues of the 1.7.0 release. If you open up nuget.org and search for the OrchardCore.Application.Cms.Targets package, you will find the newest released version of Orchard Core! Upgrade your solution to 1.7.2 now! Feel free to drop on the dedicated Gitter chat or use the Discussions on GitHub and ask questions! Let's just quickly list the fixes that have been addressed in the latest release. If you click on each, you will be redirected to the related This week in Orchard post, where you can find more details about them. Position the modal over the navbar Two alerts are displayed in admin settings to reload the current tenant Add a fallback function to crypto.randomUUID Fix workflow page list issue when using PostgreSQL (current post) Set index length limit for MySQL (current post) Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 491 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 a fallback function to crypto.randomUUID, Property Brokers is using Orchard Core - This week in Orchard (13/10/2023)

Add IsViewOrPageResult extension, add a fallback function to crypto.randomUUID; and the brand-new Orchard Core site of Property Brokers! Check out our post for the details! Orchard Core updates Add IsViewOrPageResult extension In the filters, we need to inject stuff only if the request is in full view. And in Orchard Core, we need to do this check a lot. To decide whether the rendering result is a full view, you can use the newly added IsViewOrPageResult extension. Add a fallback function to crypto.randomUUID The issue here was the crypto.randomUUID function is only available in the HTTPS context, not in HTTP. In HTTP, you get the following error in the console: crypto.randomUUID is not a function. We use this method to upload images to the Media Library. In an HTTP context, if you access the Media Library and upload a file, nothing happens, and you will get the mentioned error in the console. There is a website called HTTP Forever, which does not use HTTPS. If you visit this site and type the crypto.randomUUID() in the console, you will get an error saying it's not a function. But if you visit a site that uses HTTPS, like Lombiq.com, and type the same in the console, you will get a result. So, the crypto exists on HTTP, but the randomUUID function is not. Of course, shipping a website that is not HTTPS is maybe not a good idea but if you have a preview/staging environment where you don't want to maintain SSL certificates and so on, you may use HTTP. After this fix, if you host your Orchard Core site in HTTP, you will be able to call this function and upload files to the Media Library. News from the community A new website using Orchard Core: Property Brokers Property Brokers is New Zealand's largest regional real estate agency. Check out this 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. 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 Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 493 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!

Position the modal over the navbar, updated Lombiq's Open-Source Orchard Core Extensions - This week in Orchard (06/10/2023)

Position the modal over the navbar, fixing that two alerts are displayed in admin settings to reload the current tenant, and our Open-Source Orchard Core Extensions solution is updated to Orchard Core 1.7! Check out our post for the details! Orchard Core updates Position the modal over the navbar In the admin UI of Orchard Core, we are using Bootstrap modals to add dialogs for lightboxes, user notifications, or other Orchard Core-specific content, like adding deployment steps to your deployment plan. We had a UI issue regarding the modals, meaning whenever there is a large modal, the modal shows up under the top navbar. When a modal is open, it shows the most visible. It is fixed, and now, the modal is displaying before the navbar. Two alerts are displayed in admin settings to reload the current tenant Some pages in Orchard Core (like /Admin/Settings/email, /Admin/Settings/localization, /Admin/Settings/SecurityHeader, which pages contain settings that will reload your current tenant if you hit Save) display two identical warning alerts: The current tenant will be reloaded when the settings are saved. The problem is happening because the Settings_Wrapper__General wrapper is always injected for all settings regardless of the group ID, but we should only apply the wrapper when the group is "general". Here you can see that there's a new IsGeneralGroup method in the DefaultSiteSettingsDisplayDriver that checks whether the current group ID equals "general". News from the community Updated Lombiq's Open-Source Orchard Core Extensions This Orchard Core Visual Studio solution contains most of Lombiq's open-source Orchard modules and themes, as well as, related utilities and libraries. Please keep in mind that only those extensions included that use the latest released version of Orchard (i.e., the very cutting-edge ones depending on a nightly build are not yet here). And now, this solution has been updated to the latest and greatest 1.7 Orchard Core version. Check them out here, and install them from NuGet or from the source! Bug reports, feature requests, comments, questions, and code contributions are warmly welcome, please do so via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 498 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!

Extending ISetupEventHandler with new events, your DotNest site (almost) never goes down - This week in Orchard (22/09/2023)

Extending ISetupEventHandler with new events, do not specify placement position in the content field/part display drivers, and a blog post about the reliability of your DotNest sites! Let's see the details in our post! Orchard Core updates Extending ISetupEventHandler with new events We have an ISetupEventHandler interface in Orchard with a method called Setup. When there is a setup on a new tenant, we call this method. Now this method is marked as an obsolete one and will be removed in future releases. If you rebuild your Orchard Core solution in the future, it will tell you to use the new SetupAsync instead. If you have an implementation of this interface, it will still work because the newly added FailedAsync and SucceededAsync methods have default implementations. It means you don't need an abstract base class. Do not specify placement position in the content field/part display drivers Content elements or fields can be attached to a content type. Their UI placement should follow the subsequent guidelines. So, if the first step defines a position, we use that position and look no further. DisplayDriver. A placement is defined on the UI using the OrchardCore.Placements. The placements.json file. Default Position in the content type. Otherwise, it should fall back to the physical placement of the object in the content definition. For this logic to work as expected, the ContentPartDisplayDriver or the ContentFieldDisplayDriver should define a placement location by default, but not a placement position. This way, we can allow to change the order using Steps 2-5 as needed. In the following drivers, we seem to be defining a placement position that prevents the user from being able to change that position at all. FacebookPluginPartDisplayDriver BagPartDisplayDriver FlowPartDisplayDriver HtmlBodyPartDisplayDriver LiquidPartDisplayDriver MarkdownBodyPartDisplayDriver TaxonomyPartDisplayDriver TitlePartDisplayDriver For example, today if you use HtmlBodyPart, there is no easy way to change its placement because the HtmlBodyPartDisplayDriver defines a position 5. Meaning if you have a placement in the driver, there is no easy way to override it from the UI. If we leave these positions, blank it will fall back to the user settings. News from the community Your DotNest site (almost) never goes down Orchard Core and Orchard 1.x sites you host on DotNest almost never go down, with 99.99% availability in the last 3 months. Check out the details in our latest blog post here. If you haven't done it already and want to host your sites on the hugely reliable DotNest, create your site here! We also guarantee reliability in our Terms of Service. Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 505 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!