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

Copilot Integration, Last call: Speaker application for Orchard Harvest 2026 - This week in Orchard (01/05/2026)

This week, Mike Alhayek shows how to use Copilot directly inside Orchard Core!

But before that, check out some code where you can see that, starting now, Orchard supports static data migration methods, and suppressions are no longer required for migration steps that don't use instance state.

Welcome the first contribution from Jack Liu, who made the pagination of the List Part configurable to decide whether to show a full pager with page numbers or just the arrows to navigate to the previous and next pages.

Do you know that since 2013, we've been working with Óbuda University in a hands-on way to teach web development? If you are interested in our Orchard Core courses at the university, check out our post on our site!

As we mentioned, we started publishing last year's Harvest recordings to YouTube. Check them out for some inspiration, and don't forget to apply to be a speaker for this year's Harvest by the 5th of May, midnight, anywhere on Earth!

Ready to explore? Let's dive in!

Latest tutorials

Featured tags

AI
IIS
MCP
API
SMS
SEO
All tags >

This week in Orchard - 09/27/2019

The first release candidate of Orchard Core has been shipped! Read our post about the latest improvements of the new release and everything you need to know about where you can download the release and how you can work with an application that uses .NET Core 3.0! On Orchard Core Add contentitem tag helper and liquid tag Now we have a new contentitem tag helper and a Liquid tag. By using this tag helper we can render a content item directly and can also use caching. We still need to use the menu shape, because it has custom alternates that are specific to it, so we can't remove that. But at least now we have a contentitem helper that also do it for anything. Handle standard Startup class Until now if you add the Startup.cs to your module, you need to inherit the Startup class from StartupBase and you need to have to override the ConfigureServices(IServiceCollection services) or the Configure(IApplicationBuilder builder, IRouteBuilder routes, IServiceProvider serviceProvider) method. Now you can define a Startup class and don't have to inherit from anything like in ASP.NET Core. Of course, you can include the ConfigureServices or the Configure method to configure the app's services if you want, but you don't have to override anything. Fallback to Detail display type for bag parts If you create a BagPart and in the settings, if you remove the display type of the content types that you want in the BagPart, then it will be null in BagPart.cshtml and will fallback to Summary. Because they are widgets if you haven't implemented the Summary view of the widget that you are rendering, it will fallback to template Widget__Summary. But this thing doesn't exist. So the result will be a shape not found error. The solution is to fall back to the Detail, which is the default display type that we use for widgets when we render them. Configure ContentParts and ContentFields with IOptions<ContentPartOptions> or IOptions<ContentFieldOptions> We don't inject a ContentPart in the DI directly. We add the type of the ContentPart to an option, which is IOption<ContentOptions>. In this case, we don't have to resolve the ContentPart to get instances of ContentParts to know what are the ContentParts that are available. We do the same for ContentFields. Content items: Bulk actions and Filters UX Here you can see a concept to redesign the content items page for the bulk actions and the other filters: As you may see, Antoine has been mainly inspired by the GitHub issues UX. The new features are: Select all aligned vertically with the other checkboxes. Smaller left and right padding in the items list. All filters and actions on only one line. Dropdown actions with a light background (correctly displayed on a small screen). Even the Culture filter could appear. Display the number of items and the number of selected items when checked. It is just a POC. To make it work completely, we will need to find a way to select and display the state of the different filters like GitHub does it. For example: type:Article status:published sort:created Just to have a big picture of the two different screens, the current UI looks like this: This feature hasn't been available in Orchard Core yet but will be added in the next version of Orchard, because it was too risky to change the content items page before the RC in this huge way. Add translation metapackage to Cms.Targets As expected we added the OrchardCore.Translations.All to the Cms.Targets. If you use the Cms.Core.Targets you won't have it, but if you use the Cms.Targets you will get the themes and all the localization in your solution. But it didn't work, because there were some missing MSBuild Targets. Now it has been fixed. Orchard Core first release candidate has just shipped The community proudly presents the first release candidate of Orchard Core! RC means that the software is almost ready for the final release. No feature development or enhancement of the software is undertaken; tightly scoped bug fixes are the only code you're allowed to write in this phase, and even then only for the most heinous and debilitating of bugs. Let's see the list of changes for this release. As you can see from the list, Orchard Core is now on ASP.NET Core 3.0. That means now if you would like to contribute to Orchard Core you will need to install Visual Studio 2019 16.3. By updating to this version you will automatically get .NET Core 3.0 too because it is included in this version, but from here you can download both the SDK and the Runtime. The NuGet packages in NuGet.org are also updated and have the version number 1.0.0-rc1-10004. Don't forget that from now you can also download the translation packages from NuGet.org. There is an OrchardCore.Translations.All package that contains all the languages, but you can find the packages for every language separately too. Oh, and don't forget the Docker images of Orchard Core! You can also try the new version on Try Orchard Core. So don't hesitate, upgrade your Orchard Core site from Beta 3 to RC now! Building modular, multi-tenant ASP.NET Core apps with Orchard Core framework There was the .NET Conf this week, which was a 3-day virtual developer event co-organized by the .NET community and Microsoft. Sébastien submitted a talk about Orchard Core modularity and multitenancy and he was able to speak! At September 24 at 00:00 (UTC), he made a great talk about building modular, multi-tenant ASP.NET Core apps with Orchard Core framework. If you haven't seen his section yet, you can watch the recording in Twitch. On Lombiq Silent improvements in the background in DotNest As you may now DotNest is a SaaS provider that gives hosted Orchard CMS web applications hosted by Lombiq Technologies. We are thrilled to develop and maintain a provider like that and improved our services for time to time to make a better DotNest for you! Now we have just added some infrastructure improvements and making payments safer with PSD 2. Orchard Dojo Newsletter Now we have 94 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!

This week in Orchard - 09/13/2019

Lots of PRs merged to Orchard Core this week again coming with new fixes, and features. You could also read about the new way how you could use the localization packages in Orchard Core soon. Check out our current post for more! On Orchard Core Editor direction should respect the Localization Part culture Everything that is editable (like TextField, TitlePart, etc.) will now be configured whatever the content item's culture is. There is a new helper method, called GetContentCultureAsync that gets the CultureAspect of a content item, that will provide the CultureInfo of the content item. If you have the Localization module enabled, it will set it using the LocalizationPart of the content item (otherwise it will use the default culture of the site). Add Properties Dictionary to IShape interface We decided to provide a Properties bag on the IShape interface where you can put anything on a shape. You can do it in Orchard 1.x and in Orchard Core too, but only if the shape is a dynamic object. The readme file is updated about how can you do that using Liquid. Clean double encoding Use the tag helper instead of the ActionLink when working with localized strings. Every time when you have an ActionLink with a localized string it will be double encoded because the ActionLink only accepts a string. OrchardCore.Translations Repository In this repository, you can see a Localization folder that contains the localization for each culture for each module. Crowdin sends pull request to this repository whenever is a new translation is available. It creates new commits with every change and then AppVeyor will build the changes and this will build NuGet packages for every language. Each NuGet package will only contain the localization files for the given language. We publish the NuGet packages to MyGet prefixed with beta3. Once the dev will be merged to master it will move to nuget.org. There is also a meta-package called OrchardCore.Translations.All, that contains all the other languages. If you just point this package, you can translate your admin in any language automatically. Of course, you need to add the given language as a supported one. .NET Conf 2019 There will be the .NET Conf soon, which is a 3-day virtual developer event co-organized by the .NET community and Microsoft. Sébastien submitted a talk about Orchard Core modularity and multitenancy and he is able to speak! At September 24 at 00:00 (UTC) he will be speaking about building modular, multi-tenant ASP.NET Core apps with Orchard Core framework. Don't forget to join! Starting a new project with Orchard Core Garry Woodfine, an experienced full-stack developer has just started to work with Orchard Core. In this blog post, he writes about how you can build new Web Applications with Orchard Core, install Orchard CLI and start your CMS Website. On Lombiq Orchard Dojo Newsletter Now we have 90 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!

This week in Orchard - 09/06/2019

Lots of PRs merged to Orchard Core this week that adds new improvements, fixes, and features. You could also read a demo about the Content Fields Indexing, that is a very useful feature for the developers: they can now query content items based on the value of the fields! Oh, and we will have a meetup soon in Budapest, where Lombiq will giving a talk on Orchard. Get ready for a longer post about these amazing features! We promise: you won't regret reading it! On Orchard Core Add ORCHARD_APP_DATA Environment Variable section If you want to change where the App_Data folder is, you can define an environment variable called ORCHARD_APP_DATA. Paths can be relative to the application path (./App_Data), absolute (/path/from/root), or fully qualified (D:\Path\To\App_Data). If the folder does not exist the application will attempt to create it. Localization files publishing When we deploy the app it will also publish the Localization folder, which is where the localization files go. Instead of the App_Data/Localization, they go into the Localization folder of the content root. Content Culture Picker improvements There is a new Liquid helper called switch_culture_url, that is responsible to return the URL of the Action that switches cultures. The ContentCulturePickerContainer is the template of the culture picker, that you can add in your front end themes to display a customized drop-down or a list of options to change the culture of the website. There was no example about how to override this using Liquid, now the documentation has an example using the new switch_culture_url helper. Workflows Internationalization Now every Task and Event have a LocalizedString property called DisplayText. With this change, you can localize the title of every activity. Make setting the page title format accessible to site administrators When you navigate to the general settings page you can find a new option called Page title format. Here you can now provide a Liquid expression to customize the way how you would like to render the title of your page. In the screen, you can see that we set the Page title format to {% page_title Site.SiteName, position: "before", separator: " -.-.-.- " %} By providing before as the position, we will show the name of the site first, then the title of the page with a custom separator. Check the second tab in the screenshot above to see the result of the expression. Handle UnauthorizedResult When trying to access an unauthorized ContentItem in the front end, the ItemController returns an UnauthorizedResult. Until there, it's correct. However, UnauthorizedResult is treated like any other error and an error message is returned: "An error occurred while executing this request." leaving us thinking there is a bug. The solution is we need to return the Forbid or Challange results, not just Unauthorized. If you are authenticated, we can just return Forbid to say you don't have access to this page. If you are not authenticated, we return a challenge, that will be redirecting you to the login page to give you a chance to authenticate yourself. In the future in most of the controllers, we should use this logic. Add documentation to health check The HealthChecks module is just enabling the middleware and the new documentation now mentions that the default endpoint is 'health/live'. Add support for typed shape tag helper properties There is a shape tag helper with the following syntax: <shape type="Foo" /> This will render the shape typed Foo. The Razor syntax to do the same is: @await DisplayAsync(await New.Foo()); You can pass parameters inside your page: @await DisplayAsync(await New.Foo(Age: 18, Color: "Green")); You can do the same using the shape tag helper: <shape type="Foo" age="18" color="Green" /> Let's say you create a file Foo.cshtm, that is the default template for the Foo shape. Inside that you can do the following: @Model.Age. What happens here is that you don't have IntelliSense for Age, because it's not typed. When you write the following in your template, what you get for the @age is the string 18. @{ var age = 18;}<shape type="Foo" age="@age" color="Green" /> In Razor, if the property doesn't exist on the type (which is the case here, because it's dynamic) it will be assigned as a string. It will evaluate that doing a .ToHtmlString(). If you really want to get integers, you have a new option in Razor tag helpers to bind a custom property with a prefix. <shape type="Foo" prop-age="@age" prop-color="Green" /> Using the prop- prefix the value will be converted to a property on the shape with the type of the variable that is passed. The @age will be the variable itself, in this case, it will keep the type of that we passed here directly to the property age, which is assigned to the shape. So the shape will keep the properties with the variable type instead of converting them to IHtmlContent. With this new improvement, you can pass complex objects to your shape types. For example, you can pass your object directly to a shape without needing a ViewModel. Demos Content fields indexing Now we have a new module which is Content Fields Indexing (SQL), that adds database indexing for content fields. You can also find documentation about the available tables for the database indexing and the usage of these index tables from a class, from a Razor template and from Liquid too. First, enable the Content Fields Indexing (SQL) module from the admin. If you are using the Blog recipe, you will have a Blog Post content type, thas has a Subtitle Text Field. Let's create some new Blog Posts. Let's create two published and one draft posts. Now head to the database, where you will see the new tables, like DateFieldIndex, BooleanFieldIndex, TextFieldIndex, etc. Because the Subtitle is a Text Field, let's check the content of that table. You can see the three blog posts here, where you can also notice that one of them hasn't published yet. If you enable the SQL Queries module, you can add a new SQL query to list the Blog Posts from the TextFieldIndex table. Hit Save and then Run the query. At the bottom of the screen, you will get the result of the query: the three BlogPost content types. Do you know developers from your company who'd love this feature? Show them that now they can query content items based on the value of the content fields! On Lombiq Talentera.Net meetup This one is for our friends in Budapest: we've partnered with the agile carrier building agency Talentera to bring you .Net meetups! The first one will be in three weeks, us giving a talk on Orchard. Join if you're in the city! Orchard Dojo Newsletter Now we have 91 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!

This week in Orchard - 08/16/2019

More Razor helpers, advanced Liquid support in GraphQL, a new OrchardCore.Application.Cms.Targets meta package, Full-Text-Indexing and updated milestones for Orchard Core. Want more? Then check out our current post! On Orchard Core Added Liquid support to Markdown GraphQL query We have a property in GraphQL for instance called Html on Markdown and HTML body. The new thing is that this Html property on the Markdown body was evaluating the Markdown of the content item. On the client you can directly have the Markdown evaluated, but not the source Markdown. But what was missing is that this Markdown in this body could also have Liquid. It would not interpret the Liquid syntax. Now the method first evaluates the Liquid and then convert the Markdown. Added Liquid Razor Extension Method & Markdown Helper parses Liquid Two extensions, one just to render Liquid as IHtmlContent and the other to render Liquid as a raw string that can be passed to another extension method like the markdown helper. LiquidToHtmlAsync: parses a Liquid string to HTML as IHtmlContent. MarkdownToHtmlAsync: converts Markdown string to HTML. See the updated documentation about the LiquidToHtmlAsync, and MarkdownToHtmlAsync helpers. Documentation to explain how to generate PO files Documentation to explain how to generate PO files has been merged with the tool called PoExtractor. That tool will analyze all the source code and extract all the strings that are used in the localizer. A new OrchardCore.Application.Cms.Core.Targets core CMS meta package There is an OrchardCore.Application.Cms.Targets already that you can point to. If you reference this NuGet package in your project, the CMS will just run and all the dependent Nuget packages will be downloaded. It's also linking all the themes that we have in Orchard Core and there is no way to remove them. Let us introduce a new package, called OrchardCore.Application.Cms.Core.Targets, that just contains the modules and only the TheAdmin theme. In this way you can just reference your own themes and not the other ones, that will make your deployment smaller. So, OrchardCore.Application.Cms.Targets contains every theme that we have in the solution and OrchardCore.Application.Cms.Core.Targets is just the TheAdmin theme. Full-Text-Indexing in Orchard Core This is the settings page of a Content Picker field. Here you can see the following settings: include this field in the index: be able to include the value of this element in the index. stored: when you want the value of the field to stored with the Lucene index. analyzed: when you want the content of the field to split into different words. It means you can search by word and not as a whole. Also, simplify every word, so you can find the root of the word like depends, depending will be converted to depend. sanitized: when you want to remove any HTML from a field. So HTML tags will be not available when you search. tokenized: when you want to convert the value of the field with some custom Liquid logic. Here you can take the content of the field and you can convert it using a Liquid filter and do some computation and so on. If you go to a created content item, you can see there is an option for Full-Text-Indexing in Liquid, that determines if this content type can use a customizable full-text index field by using Liquid. The Liquid template here is accessible in queries with Content.ContentItem.FullText. You can use the Model helper to reference the current element. This feature is still under development and hasn't available in the dev branch yet. Orchard Core updated milestones and Roadmap The milestones have been updated in GitHub of Orchard Core. There are more of them now: rc: we still have the rc for September 23. 1.0: now we have a 1.0 milestone for late October. 1.1: which means the next major release. 1.0.x: some bugs we need to fix that not blocking 1.0, but have to be fixed before a major release. backlog: good idea, will see when we can do that. Let's have a look at our Roadmap! On Lombiq Orchard Dojo Newsletter Now we have 91 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! There will be no 'This week in Orchard' post next week because of vacation, so see you in two weeks!

This week in Orchard - 08/03/2019

Huge steps to make Orchard Core CDN ready and to support Azure Blob Storage provider and many more improvements and fixes in our upcoming post! On Orchard Core The plural extension should work with NullStringLocalizer There is a unit test that shows the issue. When the Localization module is not enabled we are using the NullStringLocalizer and this case the pluralization was not working correctly. Reload resource settings on update When changing the resource settings (CDN/debug mode etc) the current tenant is not reloaded, so the settings don't take effect. The solution here was to just reload the general site settings when they change so that resources will change to debug/CDN/minified, etc. You can find the changes in the UpdateAsync method of the DefaultSiteSettingsDisplayDriver. Show connection string hint for all data providers When adding a new tenant or set up a new site, for some providers you need to have a connection string. Now a little hint will help you to type the connection string in the required format. Make Orchard Core CDN ready There are two concerns here. One is the Azure Blob Storage provider support and CDN support. These are actually two different concerns. In Orchard 1.x, we used Azure Blob Storage as a CDN, meaning when we would render the media from Azure Blob Storage, we would render the URL from the Azure Blob Storage, so the client would directly download the media from Azure Blob Storage. The Orchard server will not serve the file, the Azure CDN will serve it. In Orchard Core, we are using ImageSharp as the first middleware that serves the media. Right now when we render a file from Azure Blob Storage, we still render the Azure Blob Storage URL, and in this case, the media resizing doesn't work. Based on some feedback from the ImageSharp developers they said we are doing it wrong, you should always serve all your media from your server, even if it's coming from Azure Blob Storage. This way the ImageSharp filter be able to convert the images using the given sizes.When we serve a media, first we load the blob from the server, transform it, cache it locally and finally serve it. The next time when somebody asks for this media, we have it in the cache, so serve it from the cache. In this case, the Azure Blob Storage is not used as a CDN, it is used just like some storage and we have to load it whenever we need to load it. Then we still have the issue of the CDN. How do we do a CDN then, because we can't use Azure Blob Storage as the solution for the CDN? The solution is just to be able to use ACDN for any media that we render either they are from the local disk or from Azure Blob Storage, they will be always served by the Orchard Core server, but when we generate the URL to the generated media (for instance the resized media) we don't generate our own local URL to access our local cache of the resized file, but we generate a URL to a CDN endpoint (that could be any CDN endpoint, like Cloudflare, Azure, Horizon), that itself is configured to ask our server for the media. So, our only job for the CDN support is to generate a CDN URL. It can be an Azure CDN URL, not an Azure Blob Storage URL. With this CDN solution, we could work with any storage provider. When the request comes to Orchard with the local URL, it will download the file from the Blob Storage if it hasn't done it yet. The client cache is active because when we generate these files we had a public cache tag, so the client won't reload the same image again, won't send the same request again. Even if we send a request, it's cached locally on the server, so we won't ask Azure again, just load the file locally. On Lombiq Orchard Dojo Newsletter Now we have 86 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!

This week in Orchard - 07/19/2019

New Media Library web search providers for Orchard 1.x, improved documentation, and demo about the ability to set localization cookie when using the Content Culture Picker in Orchard Core. Read our post for the latest news around Orchard! On Orchard 1.x Demos New Media Library web search providers If you navigate to the modules, you will see some new ones in the Media category: now you can have Bing, Google, and Pixabay web search providers! Let's enable them and see how you can use it. For any web search provider that you would like to use you need to have an API key and provide them to Orchard under Settings -> Media. Now head to the Media Library and hit Import. Then select Web Search from the list to get the Search text box and a select list near that. Here you can use those web search providers, that you have provided an API key for. For example, let's choose Pixabay. If you select one or multiple files and hit the Import button, the selected files will be downloaded and Orchard puts them in the folder you have previously selected. Thank you for the contribution to Milán Keszthelyi from Lombiq Technologies! On Orchard Core Role-based permissions to display admin menus In the following GIF, you can see two admin menus (admins only and contributors only). Their visibility is configured from the roles page. If you logged in as an administrator, you can see both, but if you are a contributor you can only see one of them. Being able to see an admin menu doesn't mean you can see everything inside it, of course, normal permissions still apply. For example, a contributor can see the link menu, but can't see the content types links if they don't have the right permissions for them. Consuming Content Parts and Fields using C# For a while now it's possible to get strongly typed versions of Content Parts and Fields using Orchard Core. Thank's to John Rom, he wrote great documentation about how you can do that! Demos Content Culture Picker - Add ability to set Localization Cookie Last week we wrote about the Content Culture Picker feature of Orchard Core. The Content Culture Picker module helps you to manage cultures for the frontend and now comes with two now options you can set. If you enable the Content Culture Picker module, you can head to Configuration -> Settings, where you will see a new option, called ContentCulturePicker. Here you can decide to set the localization cookie when switching between cultures (this is enabled by default) and to redirects to the homepage of the target culture if the ContentItem of the target culture does not exist. The documentation is also updated about how to set the cookie from the admin site of Orchard Core or by using a recipe step. On Lombiq Orchard Dojo Newsletter Now we have 80 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 every time when 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!

This week in Orchard - 07/12/2019

Lots of new features and improvements and a very interesting demo about the Content Culture Picker is waiting for you in our current post! Oh, and of course our Orchard Core Training Demo Module has got a huge update too! On Orchard Core Set Content Types during Azure Blob creation When uploading a file, for example, a PDF into Orchard the Content Type is set to "application/octet-stream" on the Azure Blob when it should be "application/pdf" (this is the content type that Azure itself picks when you upload a PDF directly). Now Orchard Core has the fix that sets the blob properties during creation. Improve ImageSharp Middleware Processing Speed Because /Media is a well-known location we could improve the processing speed of the ImageSharp middleware and reduce the allocations it makes on every request. At the moment the MediaFileProvider returns IsValidRequest which is the first opportunity for ImageSharp to drop out of the processing pipeline. The first check in IsValidRequest checks for a valid image extension in the URL using Request.GetDisplayUrl(). If we check Request.Path for contains Media first we can bypass all the allocations from Request.GetDisplayUrl() and _formatUtilities.GetExtensionFromUri(...). Let' see the MediaFileProvider now! The IsValidRequest method here first checks that the first segment of the path is equal with the Startup.AssetsRequestPath. The AssetsRequestPath contains PathString("/media"). Add grouping of widgets to their site layer The GraphQL siteLayers query enhanced to group widgets into their layers. In the following screen, you can see that there are two widgets in the Always layer and one on the Homepage layer. Add PathBase PathBase may contain a virtual folder and, before the execution of the tenant pipeline (e.g. when executing a middleware configured at the app level), it doesn't contain the tenant prefix yet. PathBase = /{virtualFolder} - Path = /{tenantPrefix}/somePath// If no value => {}, converting the PathString to a string results in an empty string. Then, when we are in the tenant pipeline (e.g. when executing a middleware configured at the tenant level e.g. by a module), the tenant prefix (null for the default tenant) has been moved to the PathBase. PathBase = /{virtualFolder}/{tenantPrefix} - Path = /somePath In some contexts, we don't have to care about this e.g. when using the URL helper for an action, but here, how we build URLs, this is not the case. So, here it was not working under a virtual folder, the fix is to use PathBase but without reusing the tenant prefix. _contentItemlistUrl = httpContextAccessor.HttpContext.Request.PathBase + "/Admin/Contents/ContentItems1/";var formActionWithoutTypeName = Context.Request.PathBase + "/Admin/Contents/ContentItems"; LocalizationSettings recipe step documentation The Localization section in ReadTheDocs of Orchard Core has been updated with how to add cultures with recipes using the settings step. Demos Content Culture Picker When you enable the Content Culture Picker module, you will get a culture picker shape for the frontend. The Content Culture Picker module helps you manage cultures for the frontend. This uses a dropdown listing all the supported cultures and you select which culture you want to see when you are on the website. The Content Culture Picker selects the URL to redirect to like: if the ContentItem has a related ContentItem for the selected culture, it redirects to that Item if a HomePage is specified, finds the ContentItem that is set as the Homepage and attempt to find a Localization of this ContentItem for the current culture or a NotFound() page Let's see how it works! To create localizable content items, you have to enable the Content Localization module. This module will provide you the LocalizationPart, that you can attach to your content type. For the sake of the demo, we set up the site with the Blog recipe and attached the LocalizationPart to the Blog Post Content Type. Then head to Configuration -> Settings -> Localization to add more supported cultures. Now head to the editor of a content item that has LocalizationPart attached and save or publish it. You can see that our default culture is English and we added 3 other supported ones. If you click one of the cultures, the localized version of the content will be created. We created slightly modified blog posts for each culture to be able to see the differences between them. Now it's time to use the Content Culture Picker! You can find detailed documentation on ReadTheDocs about how to use the picker and what shapes are available for the frontend theme. For now, let's just simply modify the Layout.liquid file of the TheBlogTheme and using the liquid syntax, use the shape shape tag to create and render the ContentCulturePicker shape. We added a white background behind the picker to see it better. Now if you visit one of the blog posts you can switch between them using the content culture picker. On Lombiq Orchard Core Training Demo Module V2 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. Now, this module has got a huge update with new tutorials: permissions, admin menus, site settings, caching, file management, background tasks, and VueJS! In the StartLearningHere.md you can find all the training sections to easily navigate to the topic that you are interested in. Orchard Dojo Newsletter Now we have 78 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 every time when 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!

This week in Orchard - 06/28/2019

New queries for GraphQL to return all the configured layers and their widgets and to have access to the site's configured culture settings, and other smaller changes and fixes for Orchard Core are waiting for you in the current post! On Orchard Core Package.json or package.json? If you are using Orchard Core in a Windows environment, you should not to be worried about you have a Package.json or a package.json file. But if you run npm install for example on a Linux operation system, this command will fail because Package.json had the wrong case. So, instead of Package.json, you should call your file to package.json to work with every environment. WYSIWYG editor converts <div> to <p> tag Orchard Core uses Trumbowyg, that is a lightweight WYSIWYG editor when you would like to create a new content item using the dashboard. By using Trumbowyg, you can view and edit the HTML source too. When you edited the source and used <div> tags, the <div> tags automatically converted to <p> tags. In the trumbowyg.js file, you can find an array, called DEFAULT_SEMANTIC_MAP. Semantic generates a better, more semantic oriented HTML (i.e. <em> instead of <i>, <strong> instead of <b>, etc.). Since 2.12.0 you can also put an object to customize the semantic tag mapping for each one of these tags: <b>, <i>, <s>, <strike>, <div>. The issue was in this map, the <div> was converted to <p>. Now it has been fixed. Top Open Source Asp.net Core Content Management Systems (CMS) DotTutorials was developed to give .Net Developers a place to find step by step solutions for their coding problems. They plan to provide the solutions of some of the common & unique programming problems with complete source code for educational & commercial purposes, and in addition, helping developers stay up to date with the latest DotNet Libraries. They have an article in which they list down some top Content Management Systems (CMS) available for .Net Core Developers. And as you can see, Orchard Core is in the list too! Creating an Orchard Core .NET Core Project From Scratch Hofmeister Christian wrote a blog post about how to create an Orchard Core project from scratch. In this guide, he shows how to set up a custom Orchard Core CMS Web Project. He wrote the blog post in German, so if you speak this language, head to his site and read the post! Implemented siteLayers GraphQL query You have a new query that will return all the configured layers and their widgets. This could be useful for defining header/footer content on GatsbyJS or similar sites. Let's see how you can use it with the GraphiQL Explorer! You can see that you can get the description, the name and the layer rule of your layers. If you place widgets in those layers, you can get the details of them too! Using siteLayer you can create more complex queries like: query LayersQuery { siteLayers { description name rule widgets(status: DRAFT) { widget { contentType ... on Markdown { markdownBody { html markdown } } } position renderTitle zone } }} Implemented siteCultures GraphQL query If you use the siteCultures query, you can have access to the site's configured culture settings. We defined 4 supported cultures and made the Hungarian as the default. Now let's run this query using the GraphiQL Explorer! You can see that the default shows that the Hungarian localization is the default one. On Lombiq Orchard Dojo Newsletter Now we have 76 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 every time when 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! There will be no 'This week in Orchard' post next week because of vacation, so see you in two weeks!

This week in Orchard - 06/21/2019

In our post you could read a demo about the Localized Content Picker Field. But first, let's talk about the Orchard Core RC release for the first time! Then check the benchmarks of Orchard Core and many more! On Orchard Core Localized date picker There is a new editor for the Date Field called Localized Date Field. In this case, instead of using the default jQuery date editor, it uses the jQuery UI internationalized editor that based on the current culture to display the calendar with the current culture. Just select the Localized editor option when editing the Date Field. Orchard Core RC We might ship the RC version of Orchard Core when the .NET Core 3 is shipped because it will be faster and will contain more features. The RC version of .NET Core 3 is scheduled for July 2019, which means we can rely on RC because it will be stable, there won't be breaking changes until the General Availability. Here you see that the original release date for .NET Core 3.0 is scheduled for September 23, 2019. Still need to use Json.NET for GraphQL ASP.NET Core 3.0 is not using the Json.NET NuGet package anymore. It will use System.Text.Json, which will be part of .NET Core. But we do use Json.Net to represent the content items internally. So, when we try to do a GET API call to get a content item, then we try to serialize it using our custom serializer, and then System.Text.Json doesn't work with that, because it doesn't know how to serialize a JObject. So for that, we have to add Json.NET. There is no much difference between the two, just Json.NET has more features than System.Text.Json. Json.NET is a little bit slower, but when you have millions of other requests per seconds, you don't really care. The goal here is to be able to ship some JSON serialization without having to rely on third-party dependencies. Benchmarks of Orchard Core If you navigate to this URL (that is a benchmark page where Microsoft tracks all ASP.NET Core applications) and click on the pager you can find a page called Custom. In this list you have many scenarios. You can select the OrchardBlog option from the checkbox list. If you select this, you will see the benchmarks of an Orchard Core site using the Blog recipe. In the list there are two sets of machines, these are represented by the Cloud and the Physical checkboxes under the Hardware option. The cloud one is a machine in Azure using the D3 instance with 4 cores and 14 GB RAM. The physical machine is the same. In both machines, you can see the benchmarks with Linux and Windows operating systems. The red line in the diagrams belongs to the Windows OS, the black one is for Linux. As you can see, ASP.NET Core is a little bit faster (the difference is about 10 percent) when you run it in a machine that uses Windows. Here you can see the latencies and the startup time. The Startup Main (ms) means the time of the actual startup, from command dotnet run to application is started state. The memory usage is also tracked, where you can see how much memory is Orchard Core using. The CPU usage is lower on Linux and higher on Windows. On Windows, it's close to 100%, which is what we want. You can see the history of bad responses, for instance, 500 or something like this. This page also tracks the GC stats. Time in GC is a very important number. This is the percentage of time that the CPU spent in GC instead of processing stuff. So it's just collecting stuff instead of doing operations. We need to look into that and lower the number. Content Culture Picker The Content Culture Picker module helps you manage cultures for the frontend. This uses a dropdown listing all the supported cultures and you select which culture you want to see when you are on the website. The Content Culture Picker selects the URL to redirect to like: if the ContentItem has a related ContentItem for the selected culture, it redirects to that Item if a HomePage is specified, finds the ContentItem that is set as the Homepage and attempt to find a Localization of this ContentItem for the current culture or a NotFound() page This feature is still under development, but you can see the code in this PR! Demos Localized Content Picker Field Let's imagine a content type that is localized to different cultures. When using a localized content picker field you can get the localized text of the attached content item and by using this field you can only attach one type of localization of the selected content type. For example, let's add the LocalizationPart to the Article content type and create different localizations for the Article. Now let's do the interesting stuff! Create another content type (in our case call it ArticlePicker) and adds the Localized Content Picker to it that allows you to pick from Article content types. Now when you create a new ArticlePicker, you can select the Á-Propos (means About) article, but you cannot add another localization of this content item. On Lombiq Lombiq Orchard Visual Studio Extension now supports VS 2019 Our Orchard CMS and Orchard Core Visual Studio extension just got an update: it's now compatible with Visual Studio 2019! Check it out in the MarketPlace to get it, if you haven't used it already! Orchard Dojo Newsletter Now we have 75 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 every time when 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!

This week in Orchard - 06/07/2019

In our post, we show you the new GraphiQL-explorer that makes much easier to write queries in GraphiQL. Then we will see the localization improvements in Orchard Core and a new module that provides Form.io integration to build forms! Check out our post for more! On Orchard Core Added GraphiQL-explorer to the GraphiQL page GraphiQL-explorer is a plugin for GraphiQL that adds a new technique to explore and build GraphQL queries. It adds a graphical representation of available fields and inputs that can be used in queries. It also allows constructing full queries by clicking through available fields and inputs without the repetitive process of typing these queries out by hand! So, let's try the GraphiQL-explorer! First, set up your site using the Blog recipe and enable the GraphQL module. Now if you head to the GraphiQL option under the Configuration menu you will see the following screen. In the explorer, you just need to click and enter the values directly from there from this tree preview that will build a query for you. So, you don't have to type to see the available things and to autocomplete, it lists everything. Everything is based on metadata. Let's say we would like to query the published blog posts in a descending order, where the author is admin. The PR containing the GraphiQL-explorer is merged to dev, so check out to the latest commit on the dev branch and test this feature now! Implementation notes for decoupled CMS Dody Gunawinata documenting his experience with Orchard Core by commenting on issues in GitHub. Under this issue you can find full of suggestions for the users who want to start a decoupled site, and for the maintainers to improve the experience. In this issue, he writes a running commentary and notes for a decoupled CMS website implementation that it can be a reference for official documentation/guide. There are many useful comments and suggestions in this thread, so if you are planning to implement a decoupled CMS website using Orchard Core, you should definitely read his notes! Demos Localization improvements If you go to the admin site, the localization settings for the culture and the supported cultures are not in the General settings anymore, it moved to a new Localization option because they come from the Localization feature. There is always a default culture and the default culture is always part of the supported cultures. You can add here as many supported cultures as you want from the list and select the default culture using a radio button. Let's visit the site with a browser that sends Accept-Language: en. Let en be a supported culture, but not the default one. If we print the current culture here (@System.Globalization.CultureInfo.CurrentUICulture.Name) you could see it's fallback to en. If we ask for a culture that doesn't supported, it will fall back to Hungarian, because it's the default one. If we remove en from the list of supported cultures, the value of the current culture will be hu-HU, because that's our default one. The browser asks for en, but it's not supported. One more thing: if you add a culture from the list, it will automatically remove it from the list to prevent you to add that culture multiple times. If you delete a culture it will be available in the list again. And now if you want to get the default culture and the supported cultures from code, you should resolve the ILocalizationService in the OrchardCore.Abstractions module. Form.io integration to build forms in Orchard Core There will be a new module that's integrating Form.io into a part, therefore you can use Form.io to build forms and hook it up to a workflow in Orchard Core. Form.io is an enterprise class combined form and API data management platform for developers who are building their own complex form-based business process applications. To try out the JavaScript SDK library, you can use the Form Builder on this page that allows you to build a form. By enabling this module you will get a new content type, called Simple Form. If you create a new Simple Form, you will get the familiar Form Builder that comes from Form.io. You can define the URL to submit the form to and the HTTP method to use when submitting the form. If we save the content item without specifying the action and submit the form, we will see a message: "Please specify an endpoint. Data to submitted:". The metadata contains stuff that provided by Form.io and the submission contains the data that comes from the form. Let's see how you can use it in a workflow. Let's start the workflow with an Http Request Event that triggers the workflow with an URL that is invokable. This will be the URL that we need to call when submitting the Simple Form. The Validate and Create Froggy Script Task is about to use JavaScript to get the values from the JSON that the Simple Form submitted. Inside the script we get the values of the submission, check the data inside it and using the createContentItem function to create a new content item. The validation could be outsourced to a new task to validate data based on the JSON that comes from Form.io, but for now, the validation happens here. This module is in development and isn't available yet, but in the closer future, it may be downloadable as an open source module. Thanks for the hard work on this for Jean-Philippe Tissot! On Lombiq Orchard Dojo Newsletter Now we have 69 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 every time when 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!