Plugin

Developer
Supported

EE 1
EE 2
Category ID

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

You must be logged in to post.

Add-on Not Rendring Properly

Support Request

Geoff Towle
Geoff Towle

I am trying to use this add-on in conjunction with Child Categories. I can see that the category_id is parsed, but when I replace the hardcoded parent parameter in the child_categories tag with the category_id variable, the template displays all of the parent categories from the category group rather than the child categories of the parent group.

Here is my test code (again, replacing the parent parameter with an ID number works):

{exp:category_id category_group="1" category_url_title="substance_abuse"}

{exp
:child_categories parent="{category_id}" }
{parent_category_start}
Parent Category
<h1><a href="{homepage}/category/{parent_category_url_title}/">{parent_category_name}</a></h1>
{parent_category_end}

{child_category_start}
Child Category
<h2><a href="{homepage}/category/{child_category_url_title}/">{child_category_name}</a></h2>
Total entries{entries_total}<br>
{child_category_end}
{entries_wrapper_top_start}
div {entries_wrapper_top_end}
{entries_start}
<a href="{weblog_url}{url_title}">{title}</aWeblog{weblog_name}posted{entry_date}<br>
{entries_end}
{entries_wrapper_bottom_start}
< /div >{entries_wrapper_bottom_end}
{
/exp:child_categories}

{
/exp:category_id} 

EDIT: Forgot to mention this is on a EE 2.3.1 site.

Geoff Towle
# 1
Geoff Towle

Oh - I think I just figured it out. Need the parse parameter. I didn’t see that in the parameters list - just happened to find it in the example. Thanks!