Question is related to using ExpressionEngine version 2.10.1
I'm trying to build a page which lists PDF catalogues belonging to a particular brand. Brands are unique, but each brand may have 1 or more catalogues.
Set up in EE is as follows:
- Each brand name has been entered under Channel Administration > Categories.
- There are channels called 'Brand' and 'Catalogue'.
- When a channel entry is made under 'Brand' it is assigned to the appropriate brand category - using the Categories tab when making the channel entry. The same applies when making channel entries under 'Catalogue', i.e. they are also assigned to the appropriate brand category.
Template starts like this:
{exp:channel:entries channel="brands"}
...
{/exp:channel:entries}
Where I've put [...] I want to retrieve anything in the 'Catalogue' channel which has been assigned to the appropriate brand category ID. I can read the brand category ID like this but not sure what to do next:
{categories}{category_id} {/categories}
After this I'm stuck because I can't use another {exp:channel:entries}
tag inside an existing one, unless I'm wrong?
Any help appreciated. I had a look at solutions which use custom queries, e.g. by using {exp:query sql="
but that doesn't seem right?
To clarify why I am starting by looping through the "brands" channel: the markup for the page requires a lot of other information about the brand to be output by the template.