Search filters to the contents list, Admin breadcrumbs - This week in Orchard (10/05/2021)

Gábor Domonkos's avatar
Admin UI, Query, This week in Orchard

Two new demos are coming this week! One is about extending the search capabilities on the contents list page, the second one is about adding admin breadcrumbs to your site. But first, let's check out some other great additions to Orchard Core!

Orchard Core updates

Add shortcut to change password from admin

Let's say you have an Orchard Core site and you are logged in as a user who has access to the admin panel. If you click on the user icon at the top-right corner of the admin theme (near the Visit Site one), you will see a pop-up window that displays the content of the UserMenu shape. This shape shows you the user name of the currently logged-in user, you can have the option to edit the user profile of that user and you can log off. Now this list has a new option, called Change password. If you click on that, you will be navigated to the page where you can change your password.

New change password option

Monaco editor

Monaco Editor is a new editor mode, available for the Html Field. The Monaco Editor is the code editor that powers VS Code. A good page describing the code editor's features is here. You could see a nice demo about adding Monaco editor to Orchard Core a few weeks ago and now the Monaco editor is merged to the dev branch, which means you can have it right away if you are using the preview packages of Orchard Core!

And that's not all! There was a bug in (it didn't trigger preview updates) when you did a live preview of your content item that has an HTML Field with a Monaco editor that is now also fixed!

Live preview with Monaco editor

Prevent Razor compilation in production

The community continuously testing Orchard Core in .NET 6 as well and doing some performance stuff if needed. This fix is about to not use Razor compilation in production. Of course, it's still enabled in development to be able to change the files dynamically.

Prevent Razor compilation in production

Performance optimizations

And if we are talking about optimizations, let's see another one: the Roles are now cached. Every time you check for dynamic content type authorization (like for each type we generate the content type localization dynamically), it would re-instantiate the dynamic type. Check out how the code uses the new OwnerPermissionsByName dictionary to know more!

Caching roles

Demos

Search filters to the Contents list

If you navigate to the admin UI of your Orchard Core site and find Content -> Content Items in the menu, you will get a list of all listable content items on your site. Here you can find a search text box on the top, that is used to find content items based on their display text values. If you type explore here, the logic will return you the blog post content item with the display text Man must explore, and this is exploration at its greatest (which is the predefined blog post that comes with the Blog recipe). But what about having a way to provide more complex queries here? For example, we want to return every content item where the display text contains a man or woman. In that case, you can write the following query in the search box: man OR woman.

man OR woman query

Or you can have other more complex queries like:

  • man AND woman: list all content items where the display text contains man and woman at the same time.
  • man NOT woman: list all content items where the display text contains man but not contains woman.
  • man woman: same as man OR woman.

But you can do a lot more by using the new filters like you can sort the content items by the created date!

Sort by created date

And that's not all of the additions that sit in this PR and just wait to be merged to the dev branch of Orchard Core! If you would like to know more with some implementation details as well, head to YouTube now for a recording!

Admin Breadcrumbs

This demo is about a feature that is in progress right now. You can find the code in this pull request. The goal of this feature is to have breadcrumbs in the admin. Let's check that out!

Let's say you have the Workflows module enabled and have at least one workflow created. If you check out the following screen, you could see that the breadcrumb will be displayed in the top bar. Breadcrumbs can be useful when you have a details page, and you want to see the parent page also. Currently there are not so many pages that have breadcrumbs, but this could be changed in the future of course.

Admin breadcrumbs

If you would like to know more about the current progress of this feature, don't forget to head to YouTube to check out this recording!

News from the community

Consultant needed for scalable TeamCity+Azure setup

Do you have a lot of experience in configuring and operating TeamCity, hosting apps in Azure, and building a scalable Continous Integration environment? We're looking for you! Check the details here!

Consultant needed for scalable TeamCity+Azure setup

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 197 subscribers! 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!

No Comments

Add a Comment