Content items Excel file import/export, add admin relative URL for admin menu nodes - This week in Orchard (16/12/2022)

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

Add Admin relative URL for admin menu nodes, add Alias to ValidationResult, and a demo about content items Excel file import/export. Check out our post for the details!

Orchard Core updates

Add /Admin relative URL for admin menu nodes

If you enable the Admin Menu feature, you will be able to create custom admin menus. You can manage admin menus under Configuration -> Admin Menus. The admin menu consists of different kinds of Admin Nodes, where a Node can be a link for each one of the selected content types or a menu item that acts as a container for others. You can also add a Link Admin Node which adds a link with text and a URL. But of course, you can also add an admin menu from the code by implementing the INavigationProvider interface or using our MainMenuNavigationProviderBase.

And as you can see from the screen, this change is about handling the case where the URL is an admin URL in the menu navigation.

Add Admin relative URL for admin menu nodes

Add Alias to ValidationResult

This minor change is about adding the Alias to ValidationResult to be able to find which one is faulty faster. Also, it contains fixes for validation message styles globally.

To test it, you can add the Alias Part to the predefined Blog Post content type. Set the value Alias of the predefined Blog Post content item to "myalias", then try to create another Blog Post content item with the same Alias value. As you can see, the validation error now contains the "myalias" at the end of the error message.

Add Alias to ValidationResult

Demos

Content items Excel file import/export

There is a need to export data to an Excel file and also to import data from an Excel file. Currently, we can do that using JSON, but JSON isn't really a business-friendly format. This is a new module that allows us to do such a thing. It's not really 100% ready, but it does the job right now, and it is worth mentioning it here as well. Let's check out how this module may work in the future!

We have two custom content types here, called Product and Product Category, just for the sake of this demo. If we edit the definition of the Product content type, you may notice two new checkboxes here:

  • Allow bulk excel file import
  • Allow bulk excel file export

If you want to import only but not export the data you can, or if you want to allow both, you can do that as well. In this case, we said we allow the Product content type to be exported and imported.

Allow import export checkboxes

This feature adds two new menu items under Content: Imports, and Export. And under Imports, you can find an Import Product option because the Product was marked as importable. If you look at this screen, everything here is generated based on the definition of the Product content type. The Columns Requirements table tells you the requirement of what the import file needs to look like in order for the system to understand it. For example, the Price field is a required field that contains a numeric value for Price. And these are all derived from the schema of the Product content type. You can actually download a template that gives you a file with the header name and also the description of what each one really means.

Import Product page

Similarly, we can export by clicking on the Export option. You can select which content type you want to export and because Product is the only exportable content type, we can say to export this by clicking on the Export Data button.

Export contents page

If you would like to know more about this feature, don't forget to check out this recording on YouTube!

News from the community

Updated Lombiq's Open-Source Orchard Core Extensions

This is an Orchard Core Visual Studio solution that contains most of Lombiq's open-source Orchard modules and themes, as well as related utilities and libraries. Please keep in mind that only those extensions included that use the latest released version of Orchard (i.e. the very cutting-edge ones depending on a nightly build are not yet here). And now, this solution has been updated to the latest and greatest 1.5 Orchard Core version. Check them out here, and install them from NuGet or from the source!

OSOCE included modules

Orchard Harvest 2023

For those too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference.

The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or are looking forward to having a Harvest again, please share your opinion by filling out this survey about the upcoming Orchard Harvest!

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 379 subscribers! We have started this newsletter to inform the community around Orchard of 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 would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about 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