We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Any way to avoid hard-coding category sets into template files?
I have a collection of articles which are categorised using categories and sets. Is there a way to include the category checkboxes from all existing sets in my article template without having to explicitly name each set?
I would like for the client to be able to add new sets without having to update the article template every time. Is this possible?
Here's one of the hard-coded categories / sets excerpt from my article.html template:
<perch:categories id="overview" label="Back Pain Overview" set="back-pain-overview" display-as="checkboxes" order="5"> <a href="/category/<perch:category id="catPath" />"><perch:category id="catTitle" /></a> </perch:categories>
Is there a way to loop through all available sets in the template & swap out the id / label / set attribute values for each?
If not, is there a better way to handle this?
Want to reply to this thread?Login with Perch