Orchardcore: Content Items as a tree or other structure?

Created on 13 Mar 2020  路  9Comments  路  Source: OrchardCMS/OrchardCore

Are there any plans to have Content Items visually represented in something like a tree or possibly tagging them to group them?

Right now, all Content Items are a flat list. That is fine for a small site with a dozen pages. But our plan is to have a much more complex division of pages and would like a way to group them.

We were going to look into a way of layering some sort of tree control on top of the current content items, but if there were plans already in the roadmap, it would be good to know that before we started.

Most helpful comment

The great thing about Orchard Core is that it is super extensible.

The Admin Menus feature is designed to allow you to build custom admin menu entries, that can be filtered however you want. Simple Content Type filtering has been very useful for me.

I have built some prototypes using taxonomies, or url's to render tree structures, but as yet they are not implemented in Orchard Core directly.

You are welcome to get some ideas from the video @hishamco linked, and the code is all on github at https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.AdminTree and https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.Themes

It's not come directly to Orchard as yet because current Admin Theme Menu doesn't lend itself to building a great tree structure, as any nodes can only expand, not include a link. Hence why I extended the Admin Theme to support that, as it was useful for what I needed at the time.

@Skrypt I never got time to have a chat with you about considering changing our standard menu css to support links and expands in the same item. Thoughts?

One of the other issues that I have seen with tree structures is that they are really great for managing small sites, but the tree gets quickly out of hand when there are 1000 + content items.

So often a slightly customised solution is better, where you design the tree how you need it to operate, to handle the quantity of items in a way where it doesn't explode the menus.

Taxonomies / Tags are a great way too easily handle this.

All 9 comments

You should use Taxonomies.

Thank you for the response @sebastienros. I took a quick look at Taxonomies. From what I can see, that will help me tag the content items. That is a good start, but I assume it won't actually change how the pages are shown in the admin? It will still be a big flat list?

Correct, this is not to organize the "pages" in the admin, directly. But I think there is a way to render this taxonomy as an admin menu item, and then it will do exactly that. @deanmarcussen did you implement that?

@randaratceridian Try to look at editing the Admin Menu (there is a feature for that) and you can add custom node, then there should be one for taxonomies. then when you click on a term, all the associated "pages" (content items) should be displayed.

As I notice Orchard Core is not tree-based structure by its nature like what I have seen in Umbraco CMS for instance, but you display your content in tree style fashion using Taxonomies as @sebastienros mentions earlier

There's a great demo by @deanmarcussen that give you some glimpse of what you intend to do https://www.youtube.com/watch?v=LlJiEEhJwEE

The great thing about Orchard Core is that it is super extensible.

The Admin Menus feature is designed to allow you to build custom admin menu entries, that can be filtered however you want. Simple Content Type filtering has been very useful for me.

I have built some prototypes using taxonomies, or url's to render tree structures, but as yet they are not implemented in Orchard Core directly.

You are welcome to get some ideas from the video @hishamco linked, and the code is all on github at https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.AdminTree and https://github.com/ThisNetWorks/ThisNetWorks.OrchardCore.Themes

It's not come directly to Orchard as yet because current Admin Theme Menu doesn't lend itself to building a great tree structure, as any nodes can only expand, not include a link. Hence why I extended the Admin Theme to support that, as it was useful for what I needed at the time.

@Skrypt I never got time to have a chat with you about considering changing our standard menu css to support links and expands in the same item. Thoughts?

One of the other issues that I have seen with tree structures is that they are really great for managing small sites, but the tree gets quickly out of hand when there are 1000 + content items.

So often a slightly customised solution is better, where you design the tree how you need it to operate, to handle the quantity of items in a way where it doesn't explode the menus.

Taxonomies / Tags are a great way too easily handle this.

Basically what you want is a root content item that can be clickable and expandable at the same time. That's going to be quite confusing for some people. I'm pretty sure this can be done but it will require some CSS refactoring on the menu of course. Basically I would need to review these modules and do the refactoring in them.

I will close this for now while it has been clarified from Dean

I will reopen this so we can continue the discussion, and end up with a result.

TODO: When contained routing is resolved (hopefully by https://github.com/OrchardCMS/OrchardCore/pull/5665 ) we should create a Taxonomy Admin Menu which would list terms in a hierarchical structure, and display a list of Leaf Content Items.

This will work well once we have term routing, as non leaf content items will be taxonomy terms, and while shown in the tree do not need a link to them.

We don't need to make any changes to the menu system to allow for _clickable and expandable_ to do this.

After we have done this we can reevaluate menu system for _clickable and expandable_ and see if there is even still a use case

Basically what you want is a root content item that can be clickable and expandable at the same time. That's going to be quite confusing for some people.

I agree @Skrypt which was why I've kept it custom so far, and not pushed for it

Dean it's yours now ;)

Was this page helpful?
0 / 5 - 0 ratings