This week in Orchard - 11/30/2018

Gábor Domonkos's avatar
This week in Orchard

Interested in the updated roadmap of Orchard Core or the beta 3 release? Or every other new features of Orchard Core? Then don't forget to read our current post!

On Orchard Core

Liquid rendering issue on Hungarian computers

In Liquid, we have a tag helper called zone to get the inner content of the tag, until we find a tag that starts with "end" and finishes with "zone", something like that:

tag.Name.StartsWith("end" + tag.Name);

The in this case would be "zone". When you are running on a Hungarian computer if you type:


the result will be true of course. But if you type


the result will be false, which means it never found the end of the zone, so it was never rendering anything, because the script was invalid: "endz" doesn't starts with "end".

The issue is that the "dz" is taken in Unicode as one char, which is not "d" or "z" it's a "dz" char, but in .NET it's only one.

The solution is to pass the comparison, so it will be culture-insensitive:

"endz".StartsWith("end", StringComparison.Ordinal);

Updated Roadmap

The community can ship beta 3 as the .NET Core 2.2. will be done. Let's see the fully or partially implemented features of beta 3:

  • Background tasks management
  • GraphQL
  • Decoupled CMS
  • Taxonomies
  • Custom navigation
  • Facebook authentication
  • ReCaptcha
  • Mini Profiler
  • Recipe migrations
  • File based Content Definition
  • The Coming Soon theme
  • Edit and Display modes

The backlog of the RC is also updated and the features are ordered by priority:

  • Content Localization
  • RTL admin theme
  • Localization packages (Chinese, Spanish, Arabic, French are the most requested)
  • Distributed hosting
  • Jobs queue
  • Output caching
  • Entities API
  • CDN support

The ContentLocalization is the most important feature for RC. You can check the updated roadmap by clicking here.


Content Picker editor improvements

If you add a Content Picker Field with a standard editor to your content, you can type to search the referenced content when you editing the content item. If you allow to select multiple elements of the content types, you can move them around, reorder them by a simple drag and drop.

Resource Management configuration

If you view the source code of the home page, for example the Blog theme, you can see that it's using the min files.

<!-- Custom styles for this template -->
<link rel="stylesheet" href="/TheBlogTheme/css/bootstrap-grid-ext.min.css">

<link rel="stylesheet" href="/TheBlogTheme/css/clean-blog.min.css">

If you go to admin and head to Configuration -> Settings -> General, you will find two new things:

  • Use CDN (Content Delivery Network) — Whether the defined CDN value is used for scripts and stylesheets, or their local version
  • Resource Debug Mode

Let's see a style tag helper in a liquid file:

{% style name:"bootstrap", use_cdn:"true", version:"4" %}

The value of the use_cdn is true. So, the bootstrap is forced to use CDN and you will see the following when you inspect the code:

<link crossorigin="anonymous" href="" integrity="sha384-2QMA5oZ3MEXJddkHyZE/e/C1bd30ZUPdzqHrsaHMP3aGDbPA9yh77XDHXC9Imxw&#x2B;" rel="stylesheet" type="text/css"></link>

If we set the use_cdn value to false, it will take this source from the local resource we have. If we do not set the use_cdn in the tag helper it still used the local, but now if we check the Use CDN checkbox in the admin, it will use the CDN.

So, with this new setting, you can decide which assets should use CDN if you do not specify that value using the tag helper.

On top of the CDN, you can decide if you want to use the minified or the non-minified version of your scripts and stylesheets. By default, it will use the environment. For instance, if you are in development, it will use the debug version. If you are in production, it will use the minified version.

But you can force it to use debugable version to select Enabled. Then your code will be like:

<script crossorigin="anonymous" integrity="sha384-DWBJ4L0qV7ffH95jHsoooM04DWR2qtntWspYadu41Wx5kw6d0Cs7W&#x2B;7C2v2bh7vX" src="" type="text/javascript"></script>

If we say we want to disable the resource debug mode by setting the value to Disabled, our code will be like the following:

<script crossorigin="anonymous" integrity="sha384-pjaaA8dDz/5BgdFUPX6M/9SUZv4d12SUPF0axWc&#x2B;VRZkx5xU3daN&#x2B;lYb49&#x2B;Ax&#x2B;Tl" src="" type="text/javascript"></script>

Taxonomies module

The Taxonomies module now merged to the dev branch. To use it, you need to enable the module. After that, you can create a new Taxonomy under the New -> Taxonomy option.

We have previously created a new Color content type, that has a TitlePart attached. Let it be the Term Content Type.

After creating the Taxonomy, you can create new term content types here by clicking the Add Color button (because Color is our term content type here). You can simply reorder the Colors using drag and drop. Taxonomy is one content item and all of the Colors (sub-content items) are composed in the Taxonomy content item. So, if you load a Taxonomy content item, you have access to all its terms directly, so they are parts of the taxonomy document for performance reasons.

Let's say that we want to categorize the Blog posts using this taxonomy. To do that, add a new Taxonomy Field to the BlogPost content type. Now when you create or edit a new Blog post, you can select the terms.

To how to display terms in the front end and many more head to the Orchard Core Documentation about taxonomies!

Headless CMS with Orchard Core

Sebastien gave a nice demo about how to use Orchard Core as a Headless CMS on the ASP.NET Community Standup this week. You can watch the recording of the demo in YouTube!

If you are interested in more news around Orchard, don't forget to check out the recording of this week's Orchard meeting!

No Comments

Add a Comment