I have a template that outputs a list of categories and any entries associated with them.
All entries are assigned to child categories and none to the parent categories (the parent categories exist only to aid organisation of the child categories).
When the list is output, the names of the parent categories are being shown (with no entries), then the child categories with their entries as expected.
It looks something like this
Cat1
Cat 1A
(entries)
Cat 1B
(entries)
Cat 1C
(entries)
Cat2
Cat 2A
(entries)
Cat 2B
(entries)
Cat3
Cat 3A
(entries)
Cat 3B
(entries)
How can I not show the parent categories but keep the child categories showing?
i.e. the output will look like this...
Cat 1A
(entries)
Cat 1B
(entries)
Cat 1C
(entries)
Cat 2A
(entries)
Cat 2B
(entries)
Cat 3A
(entries)
Cat 3B
(entries)
Is my only option to remove the parent categories completely?
Here's my current template code
{exp:channel:categories channel="attachments" category_group="2" parent_only="no" style="linear" show_empty="no"}
<h3>{category_name}</h3>
{exp:channel:entries channel="pages" entry_id="112" }
{exp:playa:children field="attachment" category="{category_id}" disable="members"}
<ul>
<li>
<a href="{attachment-file}">{attachment-file-text}</a>
</li>
</ul>
{/exp:playa:children}
{/exp:channel:entries}
{/exp:channel:categories}