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

Centralize the Indexing process, Remove Media files for a removed tenant when using Azure Blob Storage - This week in Orchard (20/06/2025)

This time, you can see a demo about centralizing the Indexing process and having a unified UI for managing Indexes and the Search Settings! But first, let's look at our other topics, like removing Media files for a removed tenant when using Azure Blob Storage, and adding RouteEndpoint cache. Don't forget that you can still fill out our Orchard Core Admin UI experience renewal survey to help shape the future of Orchard Core!

Latest tutorials

Featured tags

IIS
API
SMS
SEO
MCP
All tags >

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/26/2019

The .NET Core 3.0 Preview 7 is here! So from now, the community can start working on to update Orchard Core to .NET Core 3.0 Preview 7. That will be a huge change, but it is one of the most important updates of Orchard Core RC. Read our post for more! On Orchard Core Vue.js use proper CDN Now the Vue.js using the proper CDN, which is jsDelivr. jsDelivr provides mirrors for npm, GitHub, WordPress plugins, and custom endpoints for several other projects with special requirements. We think it is the fastest CDN and it works in China also. Note that most of the CDNs don't work in China. <script asp-src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js" debug-src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js" asp-name="vuejs" at="Foot"></script> .NET Core 3.0 Preview 7 .NET Core 3.0 Preview 7 released this week. You can think about this release as the RC (Release Candidate) version of .NET Core because this was the latest version where the developers added new features to the framework. From now only bug fixes and minor changes will come until the GA (General Availability) of .NET Core 3.0, that is scheduled for September 2019. Now, let's check out the newest release of .Net Core 3.0 here! You can see that the new version support Visual Studio 2019 and .NET Core 3.0 should be used with the latest previews of Visual Studio. So, don't forget: if you try out .NET Core 3.0, use the latest preview of Visual Studio 2019. Other versions of Visual Studio 2019 are not recommended, but you can enable .NET Core SDK previews in Visual Studio. This article explains how can you do that. If you may not have heard: the community might ship the RC version of Orchard Core when the .NET Core 3.0 is shipped because it will be faster and will contain more features. So from now, the community can start working on to update Orchard Core to .NET Core 3.0 preview. That will be a huge change, but it is one of the most important updates of Orchard Core RC. ByTutorial mentioned Orchard Core ByTutorial is a place where you can read great articles mainly about tips & trick about web development both about back end and front end. A few days ago they wrote an article, where they published a list about 7 available popular open source .NET CMS's you can choose from and Orchard Core is one of them. You can read the post here! Adding IShellConfiguration documentation Orchard Core extends ASP.NET Core IConfiguration with IShellConfiguration. Understanding IShellConfiguration maybe not so trivial for the first time, so it's very helpful to make a documentation about it. Thanks to Dean Marcussen for the docs! On Lombiq Orchard Core demo in Singapore There was a meetup at March 15, hosted by .NET Developers Community Singapore, about Hastlayer, Posits, and Orchard Core, where three members of Lombiq gave sessions about the mentioned topics. In Benedek Farkas's presentation, you heard the summarized history of the Orchard project and got an introduction to Orchard Core both from a user's and a developer's perspective. In this presentation, you'll hear the summarized history of the Orchard project and get an introduction to Orchard Core both from a user's and a developer's perspective. And now the recording is available on YouTube! Check it out now! Orchard Dojo Newsletter Now we have 84 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/14/2019

In our post you could read a demo about the GraphiQL explorer improvements. But first, check the other new features of the admin site of Orchard Core and the new docs too! Check out our post for more! On Orchard Core Add Codemirror Liquid editor to Autoroute Pattern setting Now when you edit the AutoroutePart using the admin site you have a liquid editor to provide the pattern used to render the custom URL of the content type. Fix content picker width with breakpoint and making the content items reorderable If you edit a content type that has a content picker, you will see that now the picker has a correct width when displaying the screen in different sizes. You can also reorder the picked items by using a simple drag-and-drop. Furthermore, if you hover your mouse over the picked items, you will see the changes of the cursor. Extend Facebook Documentation The OrchardCore.Facebook module has finally been merged to the dev branch! It's also got updated documentation about the Facebook Social Plugin Widgets and about what are the available settings when you would like to register a Facebook App with your Orchard Core site. If you are interested in this module, we have written about it a few weeks ago! Add documentation for overriding Views New documentation has been added to the ReadTheDocs page of Orchard Core about how to override existing views that come from modules in your theme. Add View button to media library items Now when you navigate to the Assets and select or hover over a media library item, you will see a new view button under each item in order to preview the file and easily copy the URL. Demos GraphiQL and GraphiQL explorer improvements Last week we showed the new GraphiQL explorer. Since then, the explorer has got some new features. First of all, it now allows filtering and returning of the localization part data. Until now we don't currently have a way to expose a list of all the media assets stored in the media library so please welcome the new mediaAssets query to return the available assets. This is useful when using Orchard as a headless CMS with for example Gatsby to statically compile images into the website. In the screen above you can see a query to list every item from a folder called Backgrounds. You will notice a new property of every content type, called Render. If you check the box near render and run the query you will get the following result. The render property of the blog post, in this case, will show you how will a blog post be rendered. This is a full HTML of the page with a title and everything. This is exactly like you would have if you look at the source code of the page in the browser when opening the given blog post. Let's see how does it work! The assumption was that it should be very easy to render a shape and the way it was done was more complex than necessary. The render property rendering the shape from build display of the content item with any display types. You just need to call the displayHelper.ShapeExecuteAsync! That's all you need to do from a shape to render it. In GraphQL this works in the following way: using (var sw = new StringWriter()){ var htmlContent = await displayHelper.ShapeExecuteAsync(model); htmlContent.WriteTo(sw, HtmlEncoder.Default); return sw.ToString();} So just call displayHelper.ShapeExecuteAsync and pass a shape to it to get the IHtmlContent which can be written to a TextWriter! On Lombiq Orchard Dojo Newsletter Now we have 72 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!

This week in Orchard - 05/31/2019

In our post, we show you how you can create a SPA with the new recipe in Orchard Core. We also mention the tab support for admin/content edit for Orchard Core and the updated text field predefined list radio button alignment. Check out our post for more! On Orchard 1.x Lombiq had another Orchard issue bug fixing hackathon where the goal was the same: fix as many issues for Orchard 1.x as we can. We made good progress again and fixed several bugs. Let's see some of them! Adding indexes to CommonPart(Version)Record tables There are no indexes on CommonPartVersionRecord and CommonPartRecord columns, which can cause performance issues and query timeout with a couple of thousand content items in common scenarios, such as simply displaying the content list at "/Admin/Contents/List". This listing can order items by Created/Modified/Published date, so at least those columns should have an index. In this PR we added the indexes to CommonPartRecord and CommonPartVersionRecord tables. Extending automatic Workflows CSS discovery with caching Using ICacheManager we store the names and paths of the resources used by the activities and now the IResourceManifestProvider hasn't been called on every page load. You can find the corresponding PR here. Workaround for the Azure blob rename bug This is a workaround only since the bug is in the AzureStorage SDK. When you rename the folder and the name differs only in casing the file will break - except if you rename it to a temporary name and then rename it again to the target name. On Orchard Core Update text field predefined list radio button alignment When you using the admin to set up the editor of your text field, you can choose to have radio buttons as the type of list editor when selecting the predefined list editor type. Here you can see the editor to set the options for the list. Unfortunately, the alignment of the radio buttons was not properly shown, but from now you will see a correctly formatted editor. Improve the documentation of the OpenId module The OpenId module of Orchard Core has got new features and improved configuration settings from time to time. Now the documentation has been updated with more lines about the way that how is the authorization server feature works. Tab support for admin/content edit When you create a driver you can define the placement that is the zone where you want the shapes to be rendered in like in Orchard 1. The validation remains outside the tabs. Let's see how does it work! First of all, add a new placement.json file to the theme that you use for your admin site. Now we added the placement file to the TheAdmin theme with the following content: { "TitlePart_Edit": [ { "place": "Parts#TabContainsTitle:0" } ]} This means that move the TitlePart of every content item to a tab called TabContainsTitle when editing. As per O1 if there are no tabs the editor does not display the tab dialog or wrap the content in a border. In the following screen, you could see the editor of the Landing Page content type (defined by the Agency recipe) with the two tabs. Styling is an extension of Bootstrap tabs, so works with RTL as well. Also, the tabs could go into a collapse if there are a lot of them. Demos Orchard Core SPA Install your site using the Headless CMS site recipe that creates a site with Single Page Application and content management features. Then when you open your site you will face with the following message: "File `index.html` not found. Please check the settings and/or upload your SPA" When you install your site with this recipe, you enabled the OrchardCore.SpaServices module. The purpose of this module is to serve static content and render a single page application for headless CMS mode. Once you enable the module, a spa directory is created under the site's folder from which the server serves the static files. This is the place to put your application's files. There are two options for bootstrapping, one is to use a static file and the other to define a Layout__SPA template with liquid syntax support. In the settings page, you can set the name of your static HTML file that you would like to be your home page. If you just simply copy an HTML file here with the given name, Orchard will render it as your home page. So, let's remove the tick from the checkbox near the "Use static HTML file" and create a new template called Layout__SPA. We can use the dashboard to do that if we navigate to the Templates option under the Configuration. Before creating a template, create a simple content type and a new content item that we can use in our liquid template. This MyContentType has a TitlePart, AliasPart, AutoroutePart and HtmlBodyPart. Let's see what can we do within our template. For example, let's find this content item by the alias and print the DisplayText of this content item. Note that we have also applied some styling to our template. The mystyle.css file is placed under the spa folder. Note that the PR for this feature is still open and might change in the future. On Lombiq Orchard Dojo Newsletter Now we have 66 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 - 05/24/2019

In our post, we would like to show you some improvement of the content items list and the Markdown editor of Orchard Core. We also mention the Command Line support for Orchard Core. Check out our post for more! On Orchard 1.x Lombiq has an Orchard issue bug fixing hackathon and the goal was to fix as many issues for Orchard 1.x as we can. We made good progress and fixed several bugs. Let's see some of them! NumericField default value merge error fix The Default value of the NumericField was removed by accident after a merge. Now thanks to this PR, the textbox for specifying the Default value to NumericField was readded. Merge DraftFieldIndexService.cs into FieldIndexService.cs In Orchard 1.x, you could use the DraftFieldIndexService to save the draft and the FieldIndexService to save the published FieldIndexRecords. Because of these services do the quite same thing (the only difference is to save the Published or the Draft version of the record), it could be a good idea to remove DraftFieldIndexSerivice and keep only the FieldIndexService and have an enum to set which version you would like to save. You can find the implementation in this PR. Removing IProjectionManagerExtension There was an IProjectionManagerExtension interface to provide additional methods to the IProjectionManager. For example, you can get the content items by providing the ContentPart and a number to skip, which could be a great way to have pagination. Now the methods inside the IProjectionManagerExtension moved to the IProjectionManager and the IProjectionManagerExtension interface has been deleted. See the changes in this PR. Updating Newtonsoft.Json everywhere Orchard 1.x uses an outdated version of the Newtonsoft.Json library. We updated this package everywhere in Orchard to use the latest version. Fixing that stylesheets are not found on Dashboard Resource URLs are not replaced with file virtual path in StylesheetBindingStrategy leaving the URL pointing to TheAdmin theme folder instead of the related module path. Now when you visit the admin page of Orchard and open the Developer Tools in your browser, you will notice the missing 404 errors for the CSS files thanks to this PR. Fixing that Orchard.Workflows requires styles that don't exist We had a quite similar issue here as in the previous one, except there were also some empty CSS files that are included in the csproj files. You can see the fixes here. On Orchard Core Build error if a module with views doesn't use the Razor SDK If you create a module and you have views inside and you didn't correctly use the Microsoft.NET.Sdk.Razor SDK you will get a build error. In the project files, there is an SDK tag at the top and you can define which SDK the project should be built with. When you have Razor views, you need this SDK to be able to get precompiled views and embed them in the assemblies. Now if you have views and you didn't do that, the build will automatically fail to prevent failing in runtime because it could not find specific assets or views. Or maybe you started to implement your module with a standard class library, which didn't have views, then you add a view and don't understand why it doesn't work anymore. Consider Command Line support for Orchard Core There was some Command Line support in Orchard Core, but it was removed because of performance concerns. The code that is currently in for Command Line support for Orchard Core is using the same concept as Orchard 1, where modules can provide custom commands with the Command Line extensibility. The idea would be to have a CLI that is not in process of the Orchard host, but out of a process like a very separate .NET CLI, that will talk using HTTP with the host and the tenants. Therefore we could even use a CLI to remote control some tenants or instances. We don't have to run the CLI on the machine that runs Orchard. Being able to run remotely the CLI would be nice, and to automatically discover the commands from the API. You can find more details about the Command Line support for Orchard Core in this issue. Admin CSS: wrong BS4 version If you create a new pull request and don't update to the dev branch, then you will also submit an old version of Bootstrap and assets and people will have to fix it again. The only way to prevent that is by having a CI task that will ensure that the version is committed and rebuilding the assets doesn't change anything. We can't automate it, but we can fail the build to detect it. That would be an improvement because at least we could show the issue before we commit the issue. Orchard Harvest Based on the progress on Orchard Core, we could totally have something in September or October, like we did last time in a warm location. It would be about Orchard Core of course and a little bit about Orchard 1.11. That would be also a very good way to work on a free public online workshop during the Harvest. Orchard Core will be new for most of the people and they could learn the basics of Orchard Core here. Demos Filter content items on content items list page If you navigate to the admin page of Orchard Core and head to the Content Items page, you can search content items by title. You can also filter them by content types and by version. There was an error when you filter content items and hit the back button in your browser. In this case, you got a Confirm Form Resubmission, now it's fixed by using a GET request. Bulk actions in content items list You can also realize a Select All option here to select all the content items in the page. When using the Bulk Actions button, you can publish, unpublish and delete all the selected content items without needing to do these actions one by one. Markdown editor CSS and toolbar improvements This week the community fixed a bunch of styling issues with the SimpleMDE markdown editor. It used to look like with a dark border around the top and some horrible hovers and now it looks like this. It also couldn't go full screen because the z-index was below the Orchard navbar but it now goes fullscreen. Of course, the side by side preview mode works. It does also work on mobile as well. On Lombiq Orchard Dojo Newsletter Now we have 63 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!