Forum
How do I create a list of from all regions of a certain type
I have a Perch setup so there are treatments using a Treatment template, each one detailing a salons menu of treatments (aromatherapy etc. On the homepage I want to create a dynamic list of all these treatments types so rather than hard code I thought I would query perch for all the regions that use the Treatment template and then use the result to create a menu from each each region name.
Any ideas? I thought it might be to do with perch_content_custom
I don't think we've got anything in
perch_content_custom()
that would enable you to get content from any region anywhere using a given template.If you know the region names, then you can certainly do it by specifying the region name and a path with a wildcard to match the pages to search:
You can even specify an array of possible names:
but we don't have an option for any region on any page I'm afraid.