We have a custom entity called "Topic". With this entity, users can build topics and reference other content to "belong" to the topic. We also have a requirement where, whenever a user creates a topic, a menu is also created for it. When content is added to the topic, a link is automatically added to the menu pointing to that content.
The workflow is like:
- User creates a topic.
- User references a bunch of arbitrary content to the topic.
- User saves topic.
- Menu associated with topic automatically adds links to added content.
- (optional) User adds more links to menu, not necessarily for topic content.
Now this menu currently couldn't be a custom-built block, as we also have a requirement where users should be able to to add menu links like a regular menu. But the downside to using menus is that they're config - they need to be exported. Otherwise, a deploy without the config would wipe out all the created menus.
Is there a way to create a menu without making them config? Is there a better approach to this problem?