_Details of your query go here_It’s been an eon since I used Silverstripe and now working with a client on a new website architecture using Silverstripe 4.11
I just need to know if it’s possible to present the same piece of content in multiple places through tag based architecture? For example, a form might be tagged ‘DIY’ to appear in a DIY section of the website and also tagged as ‘Professional Development’ to appear in a PD section of the website. Possible? and is there a limit to number of tags (beyond the obvious out-of-control architecture outcome)?_
I’d recommend using silverstripe/taxonomy to provide the model for your tags, and silverstripe/tagfield for the form field to pick which tags apply to a given piece of content.
You’d want to use a many_many relationship between the content and the taxonomy terms - see the relations documentation for setting that up.
Then you should be able to use a very simply query to get all of the pieces of content with a given taxonomy term - for example if your content is in a class called MyContent and your taxonomy relation is called Tags, and you wanted all of the content tagged “DIY”, you would have a query that looks something like this: MyContent::get()->filter('Tags.Name', 'DIY');
Obviously in a real-world scenario you’d probably be getting the “DIY” value from some user input, or based on the page you’re on, or something like that.