I am not sure if I am installing the plugin properly. When I try inputing the following code (or even simpler code), my category page just pulls up the actual subcategories.php plugin. (in other words, nothing on my page will load… just the test from the plugin). Does anyone know what I am doing improperly? Thanks!
{exp:subcategories sort_by="category_name" count_entries_from_weblogs="22" count_entries_with_status="open|closed"} <li>{category_name} {if entries_count > 0}({entries_count}){/if}</li> {/exp:subcategories}
This plugin is very handy!
But I do desparately need some more variables and conditionals! 😊
How easy would it be to add a conditional for {if category_id == }
Basically I am trying to work out a way to detect if the requested category is a child of another specific one, then do something.
Is this possible somehow already?
Cheers,
Ross
MF. I think your plugin is v.nearly what i need to make a “dynamic” navigation bar. I say “dynamic” because it depends on a couple of “if” statements some handcoding and your plugin.
Basically what I’m after is.
If Super-Admin logged in.
bandname (sub cat to bands) date1 (sub cat to bandname) date2 (sub cat to bandname)
bandname2 (sub cat to bands) date1 (sub cat to bandname) date2 (sub cat to bandname)
If Band logged in bandname (sub cat to bands) date1 (sub cat to bandname) date2 (sub cat to bandname)
If else show nothing.
<ul>
<li><a href="http://{path=SITE_INDEX}" title="Home">Home</a></li>
{if username == "davidjaymz"}
{exp:subcategories root_node="2" sort_by="category_name" sort_direction="desc"}
<li><a href="#">{category_name} {if entries_count > 0}- {entries_count}{/if}</a></li>
{/exp:subcategories}
{if:elseif username == "karalta"}
{exp:subcategories root_node="4" sort_by="category_name" sort_direction="desc"}
<li><a href="#">{category_name} {if entries_count > 0}- {entries_count}{/if}</a></li>
{/exp:subcategories}
{if:else}{/if}
<li><a href="http://{path=SITE_INDEX}/{my_template_group}/static/C3/" title="Contact">Contact</a></li>
<li><a href="http://{path=SITE_INDEX}/{my_template_group}/static/C6/" title="Legal">Legal</a></li>
</ul>
At the moment I know i’m going to have to handcode some of this to work how i want it too. I don’t mind doing that. But the problem i’m having is its not showing subsubcategories.
When I’m logged in I get
Home Dead! Dead! Dead! Karalta Contact Legal
In my nav bar. when really i want the sub cats to the bands name to show up. This doesn’t have to be nested or anything I just want them to show up. If i log in as a band i do get their subcats (ie the dates) but I think thats because i’m setting their cat id as the root_node.
So I guess what i’d like to know is if there is a way to get it to show subsubcats or not.
Thanks again for an excellent plugin.
Hi again, i have two questions about plugin itself:
a) There is subcategories in the category. Then it shows only subcategory listing. b) There isn’t any subcategories in the category. Then it shows entry listing.
Thanks in advance for your help.
Regards.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.