I have two channels - Parent and Child
Parent: Batteries. This Channel has categories. I create an entry in Battery (ex: AAA) and add it to the “Disposable” category. I then relate this entry to it’s brand: Panasonic.
So the end result is it is AAA, Disposable and is Panasonic
Child: Brand This is just a channel where I create all the brands
What I am trying to do: Create a page where I list all batteries and sort them by brand and show the type - disposable or rechargeable (which are categories).
This is what I have so far. Showing the categories is where I’m having trouble and help will be appreciated.
<div class="row">
<div class="col-sm-12">
{exp:channel:entries channel="brands" dynamic="no" orderby="title" sort="asc"}
<div class="row clearfix m-b-50">
<h2>{title}</h2>
{parents field="brand" channel="batteries" orderby="title" sort="asc" limit="6"}
<div class="col-md-2">
Type: {categories}{category_name}{/categories}
<a href="/{segment_1}/{parents:url_title}">{parents:title}</a>
</div>
{/parents}
</div>
{/exp:channel:entries}
</div>
</div>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.