3
votes

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

So I'd like to have a page for each plugin, and a page for each available command, then somehow link the plugins with their supported commands.

On the plugin page, I'd like to have a list of all the commands supported by that plugin.

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

I'm happy with creating content types and I guess I'll create a 'Plugin' content type and a 'Command' content type. I expect the solution will somehow involve the use of queries. I'm not really sure how to tie it all together though.

I'm not really sure how to approach this. Has anyone got any suggestions for how to achieve this? Is there a way to do this just by configuration and defining new content types, or do you think I'll need to write code?

2

2 Answers

3
votes

You can either use a content picker field configured for multiple items, or you can implement it following this doc topic: http://docs.orchardproject.net/Documentation/Creating-1-n-and-n-n-relations

0
votes

One option is to us the Mechanics Module, which gives you a way to create relationships between parts either in your data migration or using the admin UI. See the Mechanics Documentation to find out more.