How to link two content types in Orchard CMS in a many-to-many relationship?

I'm working on an Orchard site where I want to document some code - a set of plugins and a set of commands that each plugin can handle.

So, I would like to have a page for every plugin and a page for every available command, and then somehow link the plugins to their supported commands.

On the plugin page, I would like to have a list of all the commands supported by this plugin.

Conversely, on the page where each command is documented, I would like to list all the plugins that support it. This appears to be a many-to-many relationship.

I am happy with creating content types and I think I will create Plugin content type and Command content type. I expect the solution to require the use of queries in some way. I'm not sure how to tie it all together.

I'm not sure how to approach this. Anyone got any suggestions on how to achieve this? Is there a way to do this just by setting up and defining new content types, or do you think I need to write some code?

+3


source to share


2 answers


You can use a content selection box customized for multiple items, or you can implement it following this doc topic: http://docs.orchardproject.net/Documentation/Creating-1-n-and-nn-relations p>



+3


source


One option is the Mechanical Module , which gives you the ability to create relationships between parts, either during data migration or using the UI administrator. See the mechanics documentation for details .



0


source







All Articles