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 >

Generic Site Settings Deployment Step, Extensible filters for contents admin list - This week in Orchard (17/07/2020)

The community has just released RC 2 a few weeks ago, but ever since Orchard Core has got several new features. This week among others we are going to see the extensible filters for contents admin list and the generic site settings deployment step. Orchard Core updates New column to the media library table view Enter the dashboard of your Orchard Core site and navigate to Content -> Media Library. Here you can view the uploaded files in a list view and in a grid view. You can switch between them using the little icons on the left side of the Filter textbox. If you view the files using the list view you will see a new column called LastModify. You can also sort the items by clicking on the header of the LastModify column. Extensible filters for contents admin list You can extend what filters are available in the contents admin list and each module can provide their own filters. Let's see this feature closely! First, install your site using the Blog recipe. Now, head to Configuration -> Features and enable the Taxonomies Contents List Filters and the Content Localization modules. The Content Localization is about to provide a part that allows localizing content items. The Taxonomies Contents List Filters feature is adding a new option under Configuration -> Settings -> Taxonomy Filters where you can select the taxonomies to filters in the contents list. As you can see, the Blog recipe comes with two predefined taxonomies: Tags and Categories. Let's select both ones. Now, head to Content -> Content Items, where you could see three new drop-downs. Categories and Tags can be used to filter by the values of the Category and the Tag Term content type. Just for the sake of demonstration make the Blog Post content type listable to see the Blog Post content items in the content items list. After if you select to filter for the content items that have the Earth tag, you will see the default one, because that post has each of these three existing posts. And you can easily add your own filters for the content items list! Without going into the details you have to add a new driver by implementing the DisplayDriver<ContentOptionsViewModel> abstract class and implement the IContentsAdminListFilter interface where you can provide the logic for filtering - modify the query (IQuery<ContentItem>) - content items. Check the TaxonomyContentsAdminListDisplayDriver.cs and the TaxonomyContentsAdminListFilter.cs files to see good examples about how to create your own filters. There was a demo about the new content filters and in the case, if you haven't seen it yet, you can watch the recording here. Demo videos in docs From time to time, the members of the community will do demos to show the latest features and improvements of the CMS. These videos are very helpful if you would like to learn a given topic (for example how to create Custom Settings using the admin UI) and you prefer videos. Now every topic in the documentation of Orchard Core containing the recording that is about showing you how to use the given feature. If we stay at the same example we will see the video at the bottom of the Custom Settings page. Add and implement IsJson() string extension method We are sure that you will meet some code in the future that is using JSON in their editor templates and you want to/need to validate that the text supplied in the editor is valid JSON. Now you can find a string extension method called IsJson() in the OrchardCore.Mvc.Utilities classes to do this. Demos Generic Site Settings Deployment Step When you navigate to the GitHub page of Orchard Core and list the open issues you will find one that is about listing the missing deployment steps, which means some settings do not have a deployment step to import and export them. The goal here is to be able to import/export every setting. For that, we have to get familiar with the notion of Generic Site Settings Deployment Step. You will find a new class library called OrchardCore.Settings.Core, where is a folder named Deployment that is containing logic to add site settings to a DeploymentPlanResult, a generic display driver that is responsible for the UI of the deployment plan and many more. Feel free to discover the content of this project! Now let's jump to the OrchardCore.Admin module. If you want to handle the custom settings via the OrchardCore.Settings.Core library, don't forget to reference it in your project. If you do that you can easily import/export the settings in your deployment plan. There is a class called AdminSettings in the OrchardCore.Admin module that contains one DisplayMenuFilter boolean property. Let's make it importable/exportable! Head to the Startup.cs file of the module and check out the DeploymentStartup class of it. Here you can see how you can use the provided generic business logic from the OrchardCore.Settings.Core project. You can see that we created a new deployment plan with the name: Admin settings and the description: Exports the admin settings by just passing these localized strings to the SiteSettingsPropertyDeploymentStepDriver. That's an easy and generic way to implement a deployment plan for your settings in your module! If you would like to know more about the generic site settings deployment step, head to YouTube! News from the community Intensive Orchard Core training for the In Motion team We had the opportunity to provide a five-day intensive Orchard Core training for the In Motion team! Read our post to know more details about the training! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 152 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!

Orchard Core RC 2 release, Visual Studio code snippets - This week in Orchard (20/06/2020)

We are thrilled to announce that Orchard Core RC 2 is now available! Check out this post to know everything about the latest release of Orchard Core. This week we will also show you a great demo about the brand new code snippets for Visual Studio, which will make your Orchard Core development more efficient! Orchard Core updates User menu as a shape There is a user menu at the top-right corner of the admin theme. In this menu, you could see the name of the logged-in user, and here is a button that you can use to log off. In the past, if you would like to change the look and feel of this menu, you had to override the whole Layout.cshtml file of the theme, because this was the file where we rendered the menu. From now there is a new shape called UserMenu, which is just about containing that piece of content that is responsible to display the user menu. So, if you would like to override that menu, just create a new Razor file in your admin theme called Usermenu.cshtml. Reviewing encoders usages There was a bug when you are sending an email, where your chars might be JSON-encoded. Let's say that you were using workflows to send a bunch of emails and in this case, Liquid is used to construct the body of the emails. You can have input data like "Country": "België" that you are rendering with {{order.UserProfile.Country}}<br />. However, workflow Liquid evaluator is using JavaScriptEncoder rather than HtmlEncoder. This results in an email with Belgi\u00EB in the body. By default when ASP.Net Core injects it's HTML helpers, it will encode all the Unicode chars. If you have any Unicode char, it will be encoded, which means you will not see the actual characters even if the browser supports Unicode characters. To prevent that you can configure the WebEncoderOptions in your web application to say that the TextEncoderSettings will accept all Unicode ranges. That means it will don't encode anything that is based on Unicode ranges. It will still encode HTML, but any char that is a Unicode char will still be returned as a Unicode char and not as an HTML entity or a URL entity or a JSON entity and so on. It's better to just opt-in for the ranges you want, but in this case, it's just a sample code to show you how you can do that. If you look at your source code when you use such chars, you will see you will have lots of HTML entities instead of the chars you wrote. Once you do that, it could be the actual chars. And also, when you are using an encoder, just resolve it in the constructor, because the encoders are registered in the DI using the mentioned arguments. If you don't want to use the arguments (TextEncoderSettings) for a custom piece of code, then don't resolve the encoder, use HtmlEncoder.Default. For more information, check out the documentation! Demos Orchard Core code snippets for Visual Studio Orchard Dojo Library is a portable package of coding and training guidelines, development utilities. These are also part of the best practices and guidelines we use at Lombiq. This library contains Visual Studio code snippets to quickly generate code in some common scenarios during the Orchard Core module and theme development. To effectively use this collection of VS snippets just point the Snippets Manager to where you cloned or downloaded this folder. To do this go under Tools → Code Snippets Manager → select the C# language → Add and Add the whole folder. For Razor snippets to also work select the HTML Language and do the same. Do note that Razor snippets will only be suggested when you hit Ctrl + space first. You can download the snippets from this GitHub repository. For example, if you type oc, the IntelliSense in Visual Studio will show you the suggestions. In the screen below you could see the code that is generated if you are using the ocmigrations snippet. That is about generating a class that implements the DataMigration abstract class and you will also get a Create method, that is the minimum requirement if you would like to add a migration. But that's not all! Check out this recording to see more snippets in action! News from the community Orchard Core RC 2 released We are thrilled to announce that Orchard Core RC 2 is now available! There is a new blog post in Orchard Core Blog that shows you the new features of the latest release. Here you could find the content localization support, and pre-configured localized Setup experience, the improved block content management experience, sitemaps management, and Azure support improvements. The NuGet packages are also updated on nuget.org. It's still prerelease of Orchard Core (the last one), so if you would like to update the packages in your solution, don't forget to put a tick in the Include prerelease checkbox if you are using Visual Studio. And don't forget the Roadmap! Here you could see a list of the fully or partially implemented features and the plans for the future releases! Upgrade your solution to RC 2 now! Feel free to drop on the dedicated Gitter chat and ask questions! Lombiq Utility Scripts Our Utility Scripts project is now open source! Many scripts for Orchard Core, Orchard CMS, Azure, SqlServer development. E.g. quick Orchard Core solution init, reset/reinstall. Head to the GitHub repository to see all the included scripts! Lombiq's Open-Source Orchard Core Extensions is now updated to RC 2 Looking for some useful Orchard Core extensions? Here's a bundle solution of all of Lombiq's open-source Orchard Core extensions (modules and themes). This repository contains the Helpful Libraries for Orchard Core that includes DateTime Libraries with TimeZone conversion, Localization Libraries and many more! But it also contains the Vue.js module for Orchard Core, the Training Demo module and that's not all of it! A new blog post about Orchard Core Nuno Cancelo is a software Engineer, eager to learn, and even more to share knowledge. Last week he published a great post about the basics of Orchard Core and he planned to publish 3 more parts where he will write about how you can create a module, a recipe, and a theme. Don't hesitate and start this journey now! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 148 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!

OpenAPI, Swagger, Taxonomy Localization - This week in Orchard (12/06/2020)

This week we prepared with two new demos: the Taxonomy Localization and the Orchard Core OpenAPI Code Generation Tools based on NSwag! But before doing that, let's see the latest changes that will be added to the RC2 release of Orchard Core that is now really just a few days ahead! Orchard Core updates Refactor Blog recipe to have fewer required fields You may found that creating blog posts in Orchard Core using the Blog recipe could be not very user friendly. When you create a new blog post, you have to provide tags and select the category for the posts, however, you will also need to add a banner image for it. These are all required fields, without these, you cannot publish your post. But from now these fields are optional and the Markdown editor is just below the Title and the Permalink, so you don't need to scroll down to start typing your new exciting post! Add ConfirmationEmailSubject to RegisterUserTask When you are dealing with workflows you can find a task called Register User. This is about register a user from a form field, meaning that the activity is getting the request body as a form to get an IFormCollection and try to get the UserName and Email values from that. If everything goes fine, the task will register the user and if you edit the activity, you will find some more stuff to set up! Here you can say to send a confirmation email to the user with a given subject and you can also use a template for the confirmation email if you want! How to contribute to the Orchard Core documentation? Have you ever thought about contributing to the Orchard Core documentation, but you cannot find a line about how to do that? Well, here comes the good news! From now, you will find a new guide in the documentation that tells you everything that you need to know to add your great getting started guides, tutorials, and everything to the documentation! Thank you for doing that! Change content API permissions You want anonymous users to be able to view your site, view your page/content item and it would just show what the layout is or the view is. But you might not want anonymous users to retrieve the full content item JSON payload, because it might shows some properties and metadata that you don't want to expose. For that, you could use the custom permission called GetApiContent that you can assign to specific roles and this is not assigned to anonymous users by default. Now, this permission was renamed to AccessContentApi and protects all /api/content methods. If you don't want a user to see all the fields, just don't grant access to the APIs at all, hence the GetApiContent permission is not required as a separate one. This will also protect POST that currently returns the full content. And one more thing: the GetApiContent was already added to the Authenticated role. Now it's removed from that role as being authenticated should not grant access to all fields. Prevent array duplication when merging existing content When you do Merge using JSON.Net it will just merge the different arrays. In some cases, it's not what you want. If you want an array to be replaced (for example an array of tags) then it will just add a new tag to that array and not replacing the array with a new array. On the POST operation of the API, you just want to replace the value and the PATCH operation should be the one that merges different arrays in this case. So, the Content ApiController needs to use ArrayHandling.Replace when updating existing content, or array values are duplicated. Here you can see the changed code and here comes the UpdateJsonMergeSettings: private static readonly JsonMergeSettings UpdateJsonMergeSettings = new JsonMergeSettings { MergeArrayHandling = MergeArrayHandling.Replace }; Demos Taxonomy Localization Have you ever wondered how to localize your taxonomy terms in Orchard Core? Well, it could be hard to do it for the first time, but if you are watching the following recording you can get some tips and tricks to reach your goal faster! Orchard Core OpenAPI Code Generation Tools based on NSwag Head to GitHub and clone the master branch of the ThisNetWorks.OrchardCore.OpenApi repository. Make sure that the ThisNetWorks.OrchardCore.OpenApi.Sample project is your starting project then just simply build and run the solution. When setting up your site don't forget to use the Open API Sample recipe to enable the needed modules and theme. If you navigate to https://localhost:44300/swagger, you will see the endpoints that are available in Orchard Core and a sample controller named Foo that comes from the ThisNetWorks.OrchardCore.OpenApi.SampleModule module. Here you can make queries on them and now we will also get schemas that are generated using the NSwag toolchain! Let's check for example the BlogPostItemDto! Now we can use those! The samples folder contains a console client that you can use to try the endpoints. You can simply open the solution with Visual Studio (ThisNetWorks.OrchardCore.OpenApi.ConsoleClient.sln) and fire up the ThisNetWorks.OrchardCore.OpenApi.ConsoleClient project. This is about calling the endpoints by using a static HttpClient. Open the Program.cs file and check the first few lines of the Main method here. You could see that we are getting a content item by the 4qnhdhv3z54xk4fg4tdfke76c9 and we get the content of the content item in the FooTextItemDto object. The content item with the mentioned ID is a content item of the Foo text content type, which has got one Text Field attached, named Foo Field. Our client modifies the text of this field and making a POST request to send the updated data to Orchard Core. Now if you read back from the API you will get the updated content item with the new text in the Foo Field. But there is a lot more than that! You can see that you can get the RecentBlogPosts Lucene query and use the response data, or do other Lucene queries (like give me all the blog posts) and so on. If you are interested in it, there is also a TypeScript client (tsClient.ts) which has the same kind of classes and can be used directly from TypeScript. Of course, before doing that, you have to do the authentication, get the token, and so on. For that, you have to enable the OpenID module and configure it. It also comes with the recipe by default. The back-end, the Swagger is using Authorization Code Flow, and the console client is using Client Credentials Flow. The client app has a specific API role because it's relevant to just give very limited and specific access to the system. And that's not all of it! If you need more details about the project, don't forget to check the recording on YouTube! News from the community Orchard Nuggets: How to access services from another tenant in Orchard Core? Do you run a multi-tenant Orchard Core site? Have you ever wondered how you can cross tenant boundaries? We show you the code! Check out our latest Orchard Nugget post for more! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Updated Dojo library We've updated the famous Dojo Library to Orchard Core! Orchard Dojo is a portable package of coding and training guidelines, development utilities. Check out our updated library and start learning today! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 146 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!

Custom Settings, Short Codes - This week in Orchard (05/06/2020)

This week we are going to see some code and code samples that could be good to know when developing your Orchard Core application. But we are not just doing that! We will also show you a nice demo about how to create custom settings in Orchard Core just using the admin UI without typing a line of code! Let's start our journey! Orchard Core updates Adding branding assess to docs You can find a new page in the documentation called Orchard Core Branding where you can find graphics assets for Orchard Core's branding. Allow classes by default with the HTML sanitizer Last week we saw the new HtmlSanitizerService in Orchard Core that is responsible for sanitizing the HTML code. Now when you are adding Orchard CMS to your application by calling the AddOrchardCms extension method, it will call the AddHtmlSanitizer extension method that will set up the HtmlSanitizerOptions. And it will add the class as an allowed HTML attribute to the sanitizer. Change [media] short code to Add IServiceProvider to shape Creating Created contexts The ShapeCreatedContext didn't have a ServiceProvider as the ShapeDisplayContext do. This means services resolved through an IShapeTableProvider with OnCreated either need to be resolved through the constructor, which causes disposed exceptions, and scope capturing, or by directly accessing the ShellScope.Services. But what does it mean in practice? Let's say you inherit from the ShapeFactoryEvents abstract class that implements the IShapeFactoryEvents interface and you want to add some additional logic after your shape has been created. In our case, we would like to show a new notification when a shape has been created. For that somehow we need to resolve the INotifier and the IHtmlLocalizer. To achieve our goal we can just simply get the ServiceProvider from the ShapeCreatedContext and implement the business logic. Update Fluid and YesSql dependencies Now you can track objects that have been saved and then modified again after a flush in YesSql. In Fluid everything is a decimal now and not a double because when you do 10 - 0.9 you want to see 9.1 and not 9.000009. Demos Custom Settings You may know that you can create custom settings on Orchard Core by writing some code: implement the class to store the properties, add a SectionDisplayDriver to it, then pass your class using a ViewModel to a Razor page. You may also need to implement the INavigationProvider interface to be able to reach your setting in the admin UI from a new option on the menu. But you can also create custom settings without the need of writing any line of code in a very easy way. Do you want to know how? First, we set up the site using the Blog recipe, but you can choose any of the built-in ones, you just make sure that the Custom Settings feature is enabled. Now, navigate to the admin UI of Orchard Core and select Content -> Content Definition -> Content Types and create a new content type. Let's call it Company Brand. This setting is about storing some related information about a company. The company will have a name and a logo. For that, we will attach a Text Field and a Media Field to our content type. You have to do two things to make this content type a custom setting: Disable Creatable, Listable, Draftable and Securable metadata as they don't apply. Set the stereotype of the content type to CustomSettings. And that's all! Congratulations, you created a custom setting in Orchard Core without writing any code! If you don't believe that, head to Configuration -> Settings where now you can already see a new option called Company Brand. If you click on it, the CMS will show you the editor of your content type just as you set it up when you defined the content definition of your type. Now you can work with this custom setting as you would work with the ones that you create using code. Don't forget, the documentation of Orchard Core contains a great section about custom settings. If you prefer videos, you can also check out how to create custom settings just using the admin UI on YouTube! News from the community Check your language in the Setup screen of Orchard Core With the next public release so close, please check that your language looks perfect in the Setup screen. Some culture files are only missing a few strings: Greek (1) Japanese (3) Persian (1) Polish (3) Russian (3) Spanish (1) Turkish (8) If you speak one of the listed languages, just fire up a new Orchard Core site and select your language using the picker in the top-right corner of the screen. If you find any incorrect translation or some weird string, just leave a comment below! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 146 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!

Lombiq Helpful Extensions, HTML script sanitizer - This week in Orchard (30/05/2020)

Have you ever had a hard time implementing the migration files of your content types that you have constructed using the admin UI? Let us show you the Code Generation Helpful Extensions that generate the C# code for you in a click from the admin UI! This week we are also showing you a new and useful feature of Orchard Core about how to sanitize your HTML in an easy way! Orchard Core updates HTML script sanitizer By default, every content part should prevent input from rendering <script> tags. This should be opt-in on a per-type part level. This means that even if a part editor permits it, the rendering would filter these out. We can provide a reusable service as many parts will need it. And here we go! The name of the service is HtmlSanitizerService that is responsible for sanitizing the HTML code. To do that we are using a new open-source NuGet that can be found in GitHub called HtmlSanitizer. HtmlSanitizer is a .NET library for cleaning HTML fragments and documents from constructs that can lead to XSS attacks. It uses AngleSharp to parse, manipulate, and render HTML and CSS. As you can see in the code, there is a new class called HtmlSanitizerOptions that you can use to configure the sanitizer. If you checked the Usage section of the README.md file on the GitHub page of HtmlSanitizer you could see several lists that contain the tags allowed by default, the attributes allowed by default, CSS properties allowed by default, and so on. If you navigate to the HtmlSanitizerTests file and check the ShouldConfigureSanitizer method, you could see how to use the HtmlSanitizerOptions to set up your sanitizer by for example adding additional allowed attributes to it. In the 34th line, we are adding the class as an allowed attribute. And the Sanitize method of this service (you will never guess!) is responsible for sanitizing the HTML. OK, that's cool but where and how can I use this feature in my Orchard Core site? If you have a HtmlBody Part, an HTML Field, or a Markdown Field you will find a new option in the editor of the field or the part with a new checkbox: Sanitize Html. This checkbox is enabled everywhere by default, but of course, you have the availability to disable this feature. Let's say you have a site installed with the Blog recipe and you would like to create a new Article and do some evil stuff in the HtmlBody Part. You view the HTML source and enter the line there <a href=\"javascript: alert('xss')\">Click me</a> Then hit Publish and view the HTML source again. You will notice that the code changed to <a>Click me</a>. Preview feed moved to Cloudsmith For Orchard Core, the community has switched the preview feed package repository to Cloudsmith due to much nicer retention and bandwidth policies for open source projects. It means now you can use a different feed when using the nightly build packages of Orchard Core. If you open the documentation and select the Configure Preview package source in the Getting started section you will find the new feed URL and the way about how to set it up using Visual Studio or using the NuGet.config file. Templates content items If you remember, we had the Layout Template in Orchard 1, where you could define a layout page and save it as a template to start new pages out of this template. The idea would be to make it for any content item that you could store as a template and then create items that are just clones of that. In GitHub there is a feature called issue templates: when you create a new issue, you have templates for different types of issues. To see a good example of this idea navigate to the GitHub repository of ASP.NET Core and start to fill a new issue. Here GitHub will ask you what kind of issue you would like to create. These are the issue templates. What about creating a content item and saving it as a template? The same way you have a Publish or Save as draft, you can say: Save as a template. And then it would be a content item of the specific type that might appear in the menu somewhere or might appear in the New button when you create a new content item based on the given type. When you create a new of this thing, it will just clone it and you start with a new content item that is based on that. If you have like articles with the specific background or specific text that you want to reuse you can do that. Same thing for a content type with a Flow Part attached. In this case, you can reuse the widgets too! What do you think about this idea? Do you like it? Or do you have any other thoughts about this feature? Leave your reply in the comments section below and let us know! Demos Code Generation Helpful Extensions in Lombiq Helpful Extensions for Orchard Core If you navigate to the GitHub page of the Lombiq Helpful Extensions for Orchard Core, you will find a module that contains some handy extensions that you can use in your Orchard Core solution. Note that if you are using the nightly builds of Orchard Core, you should checkout to the orchard-core-preview branch, otherwise clone the dev branch of the repository. To use this module place the content of it to your solution and if you are using Visual Studio use the Solution Explorer and add this module as an existing project to your solution. Don't forget to add this as a project reference to your ASP.NET Core Web Application. This is the way how you could add any external module or theme to your Orchard Core solution. Now if everything goes well, you can build your solution and install your Orchard Core site! Note that if you are using the nightly builds, you may need to add the preview package source as described here. Set up your application using the Agency recipe. Go to Configuration -> Features and enable the Code Generation Helpful Extensions - Lombiq Helpful Extensions module. Now head to the content definition of the Landing Page (Content -> Content Definition -> Content Types -> Landing Page) and hit the Toggle showing generated migration code button. Here you could see the power of this extension. This module is about generating migration code from content definitions. You can use this to create (or edit) a content type on the admin and then move its creation to a migration class. Generated migration code is displayed under the content types' editors. If you are interested in the full demo, don't forget to check out the recording on YouTube! News from the community New websites using Orchard Core https://saintsrow.com is the website where you can get information and order the different Saints Row games. And if you visit https://chorusthegame.com, you will find everything about an upcoming game called Chorus. 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 Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 145 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!

Short codes, new content filters - This week in Orchard (22/05/2020)

Would you like to have an enhanced way to filter your content items in the content items list? Or are you looking for a feature that could work similarly to the short codes in WordPress? If your answers are yes, then this post is written for you! Orchard Core updates Configure Dev package source If you would like to use the nightly builds of Orchard Core, then you will need to use MyGet instead of NuGet. Now the documentation contains a dedicated page to explain how to add the dev package source pointing to MyGet. Preserve external authentication tokens There is a new feature to save the external tokens to be able to reuse them inside the user payload. They are encrypted inside the User object and the UserStore now implements the interface named IUserAuthenticationTokenStore. If you are about to manage tokens you just need to use the methods here to get/set/update or remove the tokens. Document activate-links.js and extend functionality for nested menu items and action URLs In the past, by using the activate-links.js script there was no way to expand a nested menu item if the active URL was in a sub-navigation item. Also if you had an active menu link like for example /todo-items, and navigated to an action from there like /todo-items/Create or /todo-items/Edit/{id} and the URL does not appear in the menu, no item was active in the menu. Now the activate-links.js is extended to traverse URL segments to find out the active menu item and you can find a callback function to perform more actions on nested menus. There is also nice documentation about how to mark the active item in a menu. Short codes Let us show you a way to inject some predefined HTML snippets like a media snippet that you can inject in your content editors. Today when we render for example an HTML BodyPart, we will optionally evaluate it as a Liquid template, and we will also use the new Short Codes feature of Orchard Core. The idea is that there is a module in Orchard Core called ShortCodes. This feature is about letting you evaluate some HTML blocks and replace short codes. We had that in Orchard 1 (remember the notion of filters and the tokens feature). This short code is actually looking much more like tokens in Orchard 1, but with a difference. You have a ShortCodeService that has a ProcessAsync method with string input. It processes and replaces all the short codes in the HTML and returns you another string. The implementation is looking for IShortCode implementations, right now we have only one implementation, called MediaShortCode. When you call ProcessAsync, it will look for everything that has the text between [media] and [/media] and then take whatever is inside. Ensure its a valid URL and sanitize the output of this thing just in case it would contain some ref to a JavaScript or anything that could look like a script and returns the result. That is actually lighter than Liquid and easier to read. We use Liquid, because we had that, and of course you can still use Liquid. So, now you can create as many short codes as you want. For example there could be a Read more short code that is just about to render a Read more link from the summary to the full blog post. Later we can have a service like ShortCodeDefinition, that would let you describe the short code that you can support with the name, the properties, and the description, like in Orchard 1, where whenever something is tokenizable there is a little pop-up button that you can use to list all the tokens that are available. This would be very useful to have in Orchard Core too. In Orchard 1, the tokens were code-based. There was a way to chain them, which means you could have a token to return the user and from the user you could say give me his email, and so on. But in this case you had to chain them in some way. For that you can use Liquid in Orchard Core by providing good flexibility to write anything without the limitation of tokens. The token is like in the middle between the short codes and Liquid. It's not powerful enough, but it's more powerful than short codes. Short codes would be super-easy to use and you can't chain them. But you can use them recursively like you could use maybe B short code to make something bold inside an A short code. They are individually functional, they don't work together like tokens would do. And we can make short codes dynamically or from the admin like templates. We could not change the behavior of tokens from the admin, but with this logic we could list all the available short codes and also add new custom short codes. Like you could add a new Twitter short code by yourself where the template itself could be in Liquid. In this case the users can use short codes that could be easier to write than Liquid. But why is it call short codes? This name comes from WordPress, where you can already meet with a thing called shortcodes. Here is a screen from WordPress where you can see all the short codes. We can also add queries to this list, like let's inject the recent blog posts! But that's enough talk for now, let's see the media short code in action! Imagine we have an Orchard Core site installed with the Blog recipe. Now navigate to the admin site and upload an image to the root of the Media Library. We added an image here called cat.jpg. Leave a comment below and try to guess what can you see in this picture! Now navigate to the Blog and edit the built-in one. The goal is to add the media short code somewhere in the body of the post. Here you could see the way of using the media short code. Now we have one step left to do: publish the post and see it in action! As we mentioned you can use as many short codes here as you want and can display multiple cats too! Demos New content filters The header section of the content items list will be updated and different modules and features can apply filters to the content listing. The first one is the culture filter, which means that you will have the availability to filter by localized content. You can also apply the taxonomy filter and filter by categories. Or you can filter by tags if you want. To set up which taxonomies you want to use in the content list to filter on, you will find a new setting under Configuration -> Settings -> Taxonomy Contents List Filters, where you can choose which you want to use. If you are interested in the full demo and the way how it will implement, don't forget to check out the recording on YouTube! News from the community Poking around with Orchard Core You can find a huge detailed blog post about how to build modular, multi-tenant applications using Orchard Core. Thanks to Lewis for this great post! A new website using Orchard Core Shipwrecked alone on an uncharted island, explore, adapt, and navigate the land and perilous seas to stay alive. Brave the storm in Windbound, the new survival open-world role-playing game coming this August 2020 on PC, PlayStation 4, Xbox One, and Nintendo Switch. Let us show you the official website of Windbound - Brave the storm! 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 Nuggets: How to call an external API from a workflow task? In our newest Orchard Nuggets post we will show you the way how to use the Http Request Task to call an external API in Orchard Core! And guess what, we will also show you the way how you can work with the response data in your custom workflow task! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 145 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!

New Orchard Core theme, Make Content recipe step idempotent - This week in Orchard (16/05/2020)

Are you tired of the existing built-in themes in Orchard Core? Do you want to try new ones? Well, let us show you a brand new theme called The Medium Theme! The scheduled publish feature now can be used with the nightly build packages! And if you want to expand your knowledge you can read about the security-critical permissions, the new methods in the IContentHandler interface, and many more! Orchard Core updates Make FormPart generic Now you can customize a FormPart attached to any content type and define the enctype to use when submitting the form using POST method or you can enable the Antiforgery Token if you want. You can also customize the wrapper around your form. Just enable the Forms module and attach the FormPart to your type. Then you will find the following screen when editing your content type. Render BagPart items with Summary display type If you have widgets inside a BagPart, they would be displayed with the Detail display type and shows unnecessary stuffs. But the whole thing is quite weird. Why would you add a widget to a BagPart? For widgets, you can use the FlowPart and add widgets there. BagPart is for content items not for widgets. If they are in BagPart it will break your themes if you have provided custom templates for widgets using the Detail display type instead of the Summary one. You can still change the display type for the items in the BagPart to another display type if you want to customize the rendering. Here you could see a widget Summary template (Widget.Summary.cshtml) that would be used in case if you render a widget inside a BagPart because it will use the Summary display type. So, in a nutshell: BagPart will render content items as Summary display type. If any content type template was customized for Detail (Content-Foo.cshtml) in BagParts, it will need to be changed to the Summary display type (Content-Foo.Summary.cshtml). Make content recipe step idempotent If you check the IContentHandler interface you will find some new endpoints: ImportingAsync ImportedAsync ValidatingAsync ValidatedAsync The goal of these new methods is that any import or API call to query content have to be idempotent, meaning that the same action will be executed multiple times and that will result in the same effect, like if you say create a content item with the ID = 1, the first time it will create it, the second time it will tell you it's nothing to do because it's already done. Or if you call delete something 10 times, it will do it for the first time and don't do anything for the next one, don't break anything, just tell you that the call is already done. But if you say create new items 10 times, it will create them 10 times, depends on the parameters you pass. Let's see an example in the AliasPartHandler. If you try to import a content item with an alias that already exists, the result will be a fail with an error Your alias is already in use. Update configuration docs There is a section in the documentation that now shows you how to create a tenant just from the configuration. Add Scheduled Publish functionality Some weeks ago we showed you an upcoming feature to Orchard Core that is about to publish a content item in a given time in the future. Now, this feature is merged to the dev branch of Orchard Core, so if you are using the nightly builds of Orchard Core, update to the latest and try out this feature now! If you haven't heard about this module yet, check out the demo about how to use it on YouTube! Make Import Data a security-critical permission As a reminder, security-critical permission is a permission that could enable you to elevate your permissions and abuse a feature to become a super admin. There are some critical features in Orchard Core like running a recipe. If you run a recipe you can enable any feature, a feature that might give you access to anything or change some content that might give you access to anything. The Import Data Permission should be listed as security-critical because with it you can import any data to the site, including changes to roles, which could elevate permissions. The way how you can create security permissions can be seen for example in the Permissions class of the Deployment module. Demos New Orchard Core theme: The Medium Theme The Medium Theme is a free, open-source theme that you can find in the following repository. Sipke Schoorstra decided to create an Orchard Core theme based on The Medium Theme and make it open-source. This repository not just containing the theme itself, but you can find there some useful features too. Later, the theme will get its own repository. The comments are not supported yet, but that's on the roadmap that you can also find in the Readme.md file of the repository. The blog posts are associated with owners, for that the User extended with a couple of settings. Blog posts can have tags and you have many other features to use in your theme. If you are interested in everything about the new theme, don't forget to check the following recording on YouTube! News from the community Stability updates for our Orchard Visual Studio Extension Lombiq Orchard Visual Studio Extension is a Visual Studio extension with many features and templates frequently used by Lombiq developers. It contains Orchard-related (including Orchard Core) as well as generic goodies. This extension has an Orchard Log Watcher feature, that alerts you when you have any new entry in the log file. When you install this extension, you will see a new button on the Orchard Log Watcher toolbar. The button of this toolbar will be enabled when you have unread entries in the error log files. If you click on this button, the log file will be opened with the editor assigned to open .log files. And that's not all of the features of this extension! This week we released a new version that contains stability updates that fixing some potential embarrassing UI freezes. If you have it installed, the update will arrive automatically, otherwise check out here the open-source extension. In GitHub, you can find the extension's Readme with release notes too. Also, if you encountered bugs or have a feature request please add it on the GitHub page as well. Lombiq and open-source Open-source software is something we live and breathe. Check out how we contribute to the very foundation of the IT world by reading the Lombiq and open-source post on our website! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 145 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!

Named style and script Tag Helpers, This is Lombiq! - This week in Orchard (09/05/2020)

Have you ever developed a great feature for Orchard Core that you wanted to add to the source code, but you were not sure about how to contribute the code and submit a pull request? And do you want to know the team behind all that we do at Lombiq Technologies? Here are all the faces, the whole Lombiq team. This is Lombiq! Don't hesitate and check our current post for more! Orchard Core updates Make Login, Logout and ChangePassword paths configurable Now you can change the endpoints for the login URLs. These can't be changed by using code, that's why they had to be in the appsettings.json. You can find the correct way about setting these values in the documentation. How to contribute? Since now there weren't any pages where you can find details about how you can contribute your source code back to Orchard Core. Now if you checkout to the dev branch of Orchard Core you will find a CONTRIBUTING.md file in the root of the repository which tells you everything about how to contribute code and content, submit pull requests and so on. Allow registering named style and script resources with inline content You have Liquid and Razor tags for custom styling/custom scripts and the ability to say where you want your style/script to be rendered. And if you inject a custom script/styling you can set the dependency of your custom script/style. Let's see some Razor example for these additions! Imagine that you would like to add a custom script for your page and use the ID selector from jQuery to select a single element with the given ID attribute. For that, you will need to include jQuery for your page. To do that you have 2 options:Register your script using the IResourceManifestProvider, set the dependencies of your script (for example jQuery), and just simply use the script Tag Helper to inject that to your Razor page. <script name="myVeryCustomScript" asp-src="~/areallycustomscript.js" at="Foot"></script> But you can also set the dependency here by using the depends-on attribute. The second way is to add a custom script and say that you are using jQuery functions, so you will need jQuery to be able to run your script. <script at="Foot" depends-on="jQuery"> $('#myDiv').css('border', '3px solid red');</script> In both cases, you inject your script in the wanted location (foot or head) and set the dependencies of the page. That's great, but imagine that this script is in the template of a widget. And of course, a page can contain several instances of your widget. In that case, your script will be injected multiple times. In some cases, that's what you want, but if not, it's unnecessary to have that script on the page multiple times. You have several workarounds to check if the script/styling is already injected to the page or not, but now you have an easier solution for that. Let's see the following code: <script name="MyScript" at="Foot" depends-on="jQuery"> $('#myDiv').css('border', '3px solid red');</script> The only difference here is the name attribute and this makes this block a named script. Named scripts will only be injected once and can optionally specify dependencies. You can use the style Tag Helper in the same ways: <style name="my-style" depends-on="the-theme"> .my-class { /* some style */ }</style> Adding option to enable MiniProfiler on the admin too The MiniProfiler module can only display its little widget on the frontend currently. Now you have an option to enable it for the admin too. To see it in action set the option, which can be done in OrchardCore.Cms.Web's Startup class with this snippet: public void ConfigureServices(IServiceCollection services){ services.AddOrchardCms(builder => builder.ConfigureServices(services => services.PostConfigure<MiniProfilerOptions>(options => { options.AllowOnAdmin = true; })));} Or you can use the AllowMiniProfilerOnAdmin() extension method in the same method: public void ConfigureServices(IServiceCollection services){ services.AddOrchardCms(builder => builder.AllowMiniProfilerOnAdmin());} For more information about the Mini Profiler head to the documentation, where you can also find a link to the updated Configuration page. Fix RSS items description The issue in the screen below was that if the bodyAspect was not null, we are reused the bodyAspect. The bodyAspect was cached during a request, but if you are rendering many different content items, then we would reuse the same bodyAspect for all of them. In an RSS feed when we build the body of the content items, all the RSS items would have the same body. Now we are also caching the content item ID. If we don't match the exact content item ID we don't restore the cached version of the body. Check the diff in the HtmlBodyPartHandler! Here you could see the related code changes where we also cache the content item ID. Demos Kast Group Finder: an Orchard Core site Kast is an Australian company and one of their primary goals is to implement the Kast platform with the Kast Group Finder component. We worked together with Seth Cleaver (Co-founder and Director of Kast) on this tool to be able to create an intuitive self-service process that enables people within a church to easily find a suitable group to attend, simplify the administrative processes required for getting people into groups, and provide information to the group co-ordinators that might assist in planning and measuring effectiveness. Check out this YouTube video about what can you achieve by using Orchard Core and how you can use the Group Finder and let us know if you have any questions! News from the community RC2 branch If you navigate to the GitHub page of Orchard Core and check the issues, you will find one with the name RC2 Validation. There is a list that contains all the things that are needed to be done to ship RC2. Here you can find a branch that contains the list of to-dos to work on. In this checklist, you can find the items that needed to do when publishing a release. You can check this issue from time to time to monitor the current state of the RC2 release. New Orchard Nuggets posts A breadcrumb menu is a simple but effective navigation aid that shows the user where they are in the site's content structure and which path they can take back. It's also part of the web accessibility guidelines. However, there's no feature built into Orchard Core for this. Nevertheless, how to create a breadcrumb menu? It's actually really easy, just copy a piece of code from this brand new Orchard Nuggets post! Let's suppose you're building your shiny new Orchard Core website. In there you're also building a shiny new page, with Flow Part obviously. You throw together a lot of widgets to get all the bells and whistles on the page, then you save it and BAM! Internal Server Error: "InvalidDataException: Form value count limit 1024 exceeded." What's this, did I break Orchard? Is Orchard trying to break me? Let's find out how to fix this in the second Orchard Nuggets post of the week! This is Lombiq! Do you want to know the team behind all that we do at Lombiq Technologies? Here are all the faces, the whole Lombiq team. All the Orchard developers, leaders, office managers, hardware and software engineers, accountants, advisors! This is Lombiq. The two projects of ours mentioned in the video are DotNest, the Orchard SaaS (https://dotnest.com/), and Hastlayer, the .NET hardware accelerator (https://hastlayer.com/). Note that while we published this video during the coronavirus pandemic it was actually recorded during our 2019 RnDay event, in December 2019. Everyone was safe :). Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 142 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!

Content Picker Menu Item, Kast case study - This week in Orchard (02/05/2020)

Soon you will able to show content items in your menu easily! How? Check our newest This week in Orchard post and read about an amazing demo to see the new Content Picker Menu Item in action! We published a brand new case study this week on our website about the latest Orchard Core site we developed. By reading that study you can see the possibilities that you can easily achieve by using Orchard Core as your CMS! Don't forget to read our whole post for the most interesting news around the community! Orchard Core updates Added ability to restrict widgets within a flow part You can use the FlowPartSettings to give content managers the capability to restrict which widgets are available within the flow editor. If no widgets have been selected then all widgets will be available, as per the current implementation. Let's see it quickly! Set up a site with the Blog recipe and then edit the content type definition of the Page content type. To do that navigate to Content -> Content Definition -> Content Types and choose the Page. Then find the attached parts and hit Edit near the Flow one. Here you can select which content types this flow can contain. Just for the sake of demonstration, we say that the Flow editor of this page can only accept Liquid widgets. Let's see what will happen when we create a new Page! Hit New -> Page and try to add something to the Flow editor. You will see that only the Liquid one will be on the list because in the previous step we only allowed Liquid widgets. So, when you attach a FlowPart now you can decide what content types you want to be able to use in a FlowPart. It can be useful if you create a form page type with a FlowPart for it. You could then decide just to allow for form widgets. Remember: if you don't select anything you will be able to use any type of content type with the Widget stereotype in your editor. Added support for IN (SELECT) SQL statements You can use a custom SQL statement, that is about to parse for the queries module, the one that uses the generic SQL language and that will be translated to any dialect that the CMS supports (PostgreSQL, MySQL, SQLite, Microsoft SQL Server). If you use this language now you can use the select expression inside an in statement. It's also supporting the not in correctly and the like and not like was not working well, so these are also fixed. Check the new InlineData attributes added to the ShouldParseExpression test method to see some examples with the new expression. Fix shape table providers There was an issue with the way you would be able to override a template from your module, override a template for a dependent module. This change will look for shape templates in a module for any first-level dependencies and it's also improving performance because there would be fewer shape templates loaded in the memory. And if you have a feature depending on another feature then it won't be able to override the second level feature, you have to depend on that. It makes sense because you are creating a template for the second level feature, so you can depend on that because you expected that it would be there. Deployment plans search Let's navigate to Configuration -> Import/Export and create one or more deployment plans. Here you can filter the deployment plans and also do bulk actions. To do bulk actions select two or more deployment plans and after that, you will see the Delete option in the Actions dropdown. Content culture picker shape documentation If you navigate to the Content Localization section in the Orchard Core documentation, you may have noticed that there were no Razor example codes. From now the documentation has been improved with Razor examples! Demos Content Picker Menu Item Let's set up a site with the Blog recipe, create a new Page, and call it My brand new page. Then choose the Main Menu option in the admin UI and hit the Add Menu Item button. Here you could see the Available Menu Items modal window with two options: Link Menu Item and Content Picker Menu Item. Let's choose the second one! The Content Picker Menu Item is about having the ability to choose from the content items available in the CMS with a content picker. There is the Selected ContentItem dropdown, that can be used to select the content item that you would like to show on the menu. You can type to search or just simply select your item from the list. We will select our newly created page here. Publish the menu and navigate to the homepage of your site to see your menu. We placed the new menu item after the About, but of course, it's your choice to set the position of your menu item. If you are interested in the full demo don't forget to watch the recording on YouTube! Note that this feature is under development and can be found in this branch! News from the community Orchard Nuggets: How to add a culture URL segment for localization in Orchard Core So you're building a localized Orchard Core site and want all URLs to be in the form of /culture-name/rest/of/the/url, e.g. /hu-HU/my-page. What do you need to achieve this? In our newest Orchard Nuggets post, we give you the answers! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Helping Kast build a multi-tenant platform on Orchard Core Kast is an Australian company and one of their primary goals is to implement the Kast platform with the Kast Group Finder component. We worked together with Seth Cleaver (Co-founder and Director of Kast) on this tool to be able to create an intuitive self-service process that enables people within a church to easily find a suitable group to attend, simplify the administrative processes required for getting people into groups, and provide information to the group co-ordinators that might assist in planning and measuring effectiveness. Check out this case study about how we've developed this multi-tenant social group management platform for churches! 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 Core Training Demo module: combining ASP.NET Core Options with Orchard Core site settings Our Orchard Core Training Demo module has a new tutorial on combining ASP.NET Core Options with Orchard Core site settings. In the SiteSettingsController you could see how to use the Site Settings to access tenant-level settings and any other custom settings! Orchard Core Training Demo module is a demo Orchard Core module for training purposes guiding you to become an Orchard developer. You can use this module as part of a vanilla Orchard Core source that including the full source code - which is the recommended way. You can use it as part of a solution the uses Orchard Core NuGet packages, however, it's harder to look under the hood of Orchard Core features. The module assumes that you have a good understanding of basic Orchard concepts and that you can get around the Orchard admin area (the official documentation may help you with that). You should also be familiar with how to use Visual Studio and write C#, as well as the concepts of ASP.NET Core MVC. Bug reports, feature requests, and comments are warmly welcome, please do so via GitHub. Feel free to send pull requests too, no matter which source repository you choose for this purpose. Updated Lombiq Technologies logos You may have noticed that we rolled out our updated logo in the last few days. The spirit is the same: The lab flask with which we distill our IT solutions ("lombik" in Hungarian means lab flask :)). So, please welcome it! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 140 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!

Click to deploy improvements, autoroute container routing - This week in Orchard (24/04/2020)

This week we continue the journey with the new upcoming feature of Orchard Core called Click to deploy. But before that, we will check out the new Liquid helpers, the contributors' page, and many more! Finally, don't forget to take a look at our newest Orchard Nuggets post and the improvements in our Orchard Core Training Demo module! Orchard Core updates Themes standardization It can be hard sometimes to keep all the themes updated with the latest changes and improvements of Orchard Core. Now in every theme, you can add a custom template for the title or can use the features of the built-in one. If you check the code of the PageTitle shape in the PageTitleShapes.cs file, you will see the usage of the LiquidTemplateManager that helps you to customize the way how you would like to render the title of your page. We wrote about how to customize the title in Liquid here: https://orcharddojo.net/blog/this-week-in-orchard-09-06-2019. And in some themes, the HeadMeta zone hasn't been used in the layout. Now you have the possibility to show the content of this zone in every theme and rendering this at the end of the head tag. In this case, you can add your custom CSS in this section and have the ability to override the styling of the theme that you are using. Let's check the layout.liquid file of the Coming Soon Theme for these changes. Contributors Orchard Core has more than 150 contributors! The repository of Orchard Core now contains a Contributors.md file, where you can find the profiles of the contributors. They can have different badges, based on the type of work. There are badges for answering questions, doing code reviews, writing blog posts, and so on. Autoroute container routing A few weeks ago we wrote about the new settings of the Autoroute part: Allow contained item routing: Check to allow users to enable routing of child content items. Manage contained item routes: Check to allow this part to apply routes to child content items. Allow absolute path: Check to allow users to enable absolute paths for child content items If you prefer videos you can also find a demo about this feature on YouTube. And now the huge PR that contains this feature is merged in the dev branch of Orchard Core! Would you like to try this out yourself? Use the latest changes of dev branch now by adding this OrchardCore-preview MyGet URL to your NuGet sources: https://www.myget.org/F/orchardcore-preview/api/v3/index.json as it described here. Thanks for this great feature for Dean Marcussen! Add support for DictionaryAttributePrefix and ModelExplorer property in Liquid You can find an OrchardCore.Demo module in the source of Orchard Core. The goal of this project is to show you the different features of Orchard Core by providing great sample codes. This project has been updated with the latest Liquid helpers. If you open the TodoController.cs in the module, you will find the endpoints of a simple To-do app. But that's not the interesting part. There are 4 related Liquid files in the module. Two in the Todo folder in the Views called Edit.liquid and Index.liquid and two in the root of the Views folder called Todo.Edit.liquid and Todo.liquid. Here comes the content of the Index.liquid file. Here you can see a simple table contains the to-do items. But after the table, there is a button that navigates the users to a page where they can create new to-do items. You can see the block Liquid helper here and the way about how to set the route values for the button. So, if you click on that button you will be navigated to the Create action of the TodoController, that is about to render the Todo.Edit.liquid shape. Here you can also find several new helpers. The form helper is about to render a form and the helper Liquid helper is invoke the input tag helper of ASP.NET Core and binds Text of the Model. If you check the rendered page of the Todo.Edit.liquid file you will see the form that is used to create new to-do items. Every new Liquid helper (form, input, label, validation_summary, validation_for, span) can be found in the Orchard Core documentation. Add icons to Configuration Settings menus When you navigate to the admin UI of Orchard Core and check the root menu items in the navigation bar, you could see that these items have icons. From now, some submenu items are just about to show you some icons too. Head to Configuration -> Settings or Security to see the new ones. Demos Click to deploy improvements If you haven't seen the demo about the upcoming feature called Click to deploy yet, head to YouTube to watch the recording or check out the previous This week in Orchard post because this will be the continuation of the Click to deploy feature. First, navigate to Configuration -> Features and enable the three new features: Add Content to Deployment PLan Click to Deploy Content View or Export Content as JSON Now head to the content items list (Content -> Content Items) and hit the Actions button to open the dropdown. You can see that the context menu is now getting a lot more items. The Export to Deployment Target is about to automatically create a custom recipe file that can be downloaded locally or send it to a remote instance. You can use the Available Targets modal to select the destination. The Add to Deployment Plan is about to add a new content item step using this content item to an existing deployment plan. In this case, a new modal window will open again that lets you choose from the available deployment plans. The Export as JSON is about to directly download the recipe to your computer locally and the View as JSON is a very helpful feature because as you could see in the screen below it shows you the JSON representation of the content item. The same JSON will go to the content step of the recipe when you are hitting the Export as JSON button. Here you have the availability to copy the JSON structure by clicking on the copy icon at the top-right corner of the page. If you are interested in the full demo don't forget to watch the recording on YouTube! Note that this feature is under development and can be found in this branch! News from the community Orchard Core Training Demo module: creating a widget from code We have just added some lines to our Orchard Core Training Demo module to show you the way about creating a new widget from code. In the PersonMigration.cs file we defined a PersonPart, an index table for this part, a Person content type, and from now a PersonWidget. Orchard Core Training Demo module is a demo Orchard Core module for training purposes guiding you to become an Orchard developer. You can use this module as part of a vanilla Orchard Core source that including the full source code - which is the recommended way. You can use it as part of a solution the uses Orchard Core NuGet packages, however, it's harder to look under the hood of Orchard Core features. The module assumes that you have a good understanding of basic Orchard concepts and that you can get around the Orchard admin area (the official documentation may help you with that). You should also be familiar with how to use Visual Studio and write C#, as well as the concepts of ASP.NET Core MVC. Bug reports, feature requests, and comments are warmly welcome, please do so via GitHub. Feel free to send pull requests too, no matter which source repository you choose for this purpose. Orchard Nuggets: How to add a favicon under /favicon.ico in Orchard Core Every website needs a favicon of course and you can easily add one to your Orchard Core site from a theme or module with a link tag in a template. However, there's a catch: Certain browsers will still search for it (as a first attempt) under the path /favicon.ico. This can be a tiny bit detrimental to the client-side performance, and show up as annoying errors in your logs. So what can you do to serve a favicon under that path too? In our newest Orchard Nuggets post, we give you the answers! Check out the other posts for more such bite-sized Orchard tips and let us know if you'd have another question! Orchard Core workshops The contributors of Orchard Core will hold some unique online workshops in the coming months, between May and September 2020. So even with Orchard Harvest postponed due to the coronavirus pandemic we'll get some new learning events. Lombiq's developers will also give two workshops, on using Orchard from the admin UI and on developing a module. Are you looking to get up to speed with Orchard? Check out the workshops' details on the Orchard Core homepage! Orchard Dojo Newsletter Now we have 139 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!