I’m displaying parent categories in one template and embedding the child categories for each parent in a separate template. I’m doing this so the child categories can have a different style than the parents.
Parent Categories:
{exp:channel:categories channel="dialogue" category_group="54" parent_only="yes" show="not 336"}
<a href="/dialogue/category/{category_url_title}"><div class="editorbox {if category_url_title == '{segment_3}'}editorbox_selected{/if}">_ <div class="editorinfo">_ <h4>{category_name}</h4><p>_ {embed="dialogue/sub_cats" parent="{category_id}"}_ </div>_ <div class="clear"></div>_ </div></a><br />
{/exp:channel:categories}Child Categories:
{exp:channel:categories channel="dialogue" category_group="54" style="linear" " backspace="10"}
{if parent_id=="{embed:parent}"}
{category_name},
{/if}
{/exp:channel:categories}It’s all working fine, except the backspace parameter is only working for the set of child categories under the last parent. See attached image. I’m trying to get rid of the trailing comma, but it’s only working on the bottom item.