Add UsersFolder for media assets, Liquid IntelliSense for Monaco editor - This week in Orchard (18/08/2021)

Gábor Domonkos's avatar
Media Library, Permissions, This week in Orchard, Role, Permission, Liquid, Flow Part

Updating Monaco editor to have Liquid IntelliSense, new UsersFolder for media assets, a brand new Orchard Core website, and many more in our upcoming post!

Orchard Core updates

Add UsersFolder for media assets

Open up the admin UI of Orchard Core and head to Content -> Media Library. Here you will find a folder called _Users. Under this folder, you can find three different ones where each folder has the name by an ID of a given user. The reason for that is, we have three users in the system right now who have access to manage the content of the media folder and the content of their own media folder.

New manage media permissions

If you check the permissions page for one of the roles you will see some new permissions come from the OrchardCore.Media feature:

  • Manage All Media Folders
  • Manage Media For Others
  • Manage Own Media

These permissions allow administrator users to be able to manage the content of other user's media folders but can restrict others to manage just their folders. Users with the Editor role can only see and manage their own media folder.

Note that this is just about managing media assets not hiding the files of the folder. Every user can see the image served under the https://localhost:44300/media/_Users/4dsckq969tr2czhkskgg9nw3mj/image.jpg but they cannot delete this file and cannot modify the content of the 4dsckq969tr2czhkskgg9nw3mj folder. On the left window, the administrator user can see all of the folders, but on the right window, an editor user can only see their folder.

User folders permissions

If you don't like the naming _Users for the folder under AssetsPath, you can easily use another name for that just by using the appsettings.json file to configure media. If you navigate to Configuration -> Media -> Media Options you will find the name for the Assets user folder as well.

Assets users folder on the Media Options page

Liquid IntelliSense for Monaco editor

We have several custom Liquid filters and tags in Orchard Core and when you would like to use these from the admin UI of Orchard Core, (like editing a template or an Html Field using the Monaco editor) that would be nice to have some help with the registered filters and tags. This feature is about adding IntelliSense for Liquid in the Monaco editor.

Let's see how we can try it out! Here we have a site installed with the Agency recipe. That recipe contains a Content__LandingPage template for the Landing Page content type by default. If we start to type the {% shape %} expression, we will see a list that contains all the registered filters with the word shape in it.

Liquid IntelliSense of the Monaco editor

Flow alignment icon always render as left aligned

Let's say we have a content type with a Flow Part attached. If you are using Flow Part, you have the option to put several widgets to it. You can also set the alignments of the widgets and the width of the widgets meaning you can put two widgets near each other and you can say that I want to put this widget on the left side of the row and fill the 66% of the row with it and I want to put this widget on the right side of the row and fill the 33% of the row with it. You can do that using a nice UI but there was a minor bug which was about the little icon of the editor wasn't reflect the alignment of the given widget. You can see that now the icon here shows that the second Html widget inside the Container widget is right-aligned.

Fixing the flow alignment icon

News from the community

A new website using Orchard Core: City of Santa Monica

Santa Monica is a beachside city of 8.3 square miles on the westside of Los Angeles County. Offering an environment of unparalleled natural beauty, the city is home to a mix of residential communities, commercial districts, and recreational venues. And now the website of the City of Santa Monica is here, built by using Orchard Core! Check out this brand new, amazing-looking Orchard Core site here!

The website of the City of Santa Monica

If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier it is now maintained by our team at Lombiq Technologies.

DotNest Core

DotNest Core is a complete redevelopment of the DotNest platform, all on the latest version of Orchard Core. We've been running it with a couple of select few customers for a while now, and it's time to open it up a bit more. While you can't yet just simply create an Orchard Core-based DotNest site, you can sign up for our limited beta here. You'll soon be able to get a fully functional, reliably hosted Orchard Core site on DotNest where you can build your personal website or something to showcase your Orchard skills with.

Sign up for the DotNest Core beta

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 216 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 is 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 Orchard meeting!

No Comments

Add a Comment