We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New "Subcategories" plugin available.

Development and Programming

Eric A.'s avatar
Eric A.
14 posts
19 years ago
Eric A.'s avatar Eric A.

Mr. Wilson,

I would like to know also.

Thanks

ejatk

       
cshontz's avatar
cshontz
9 posts
19 years ago
cshontz's avatar cshontz

I’ve found the subcategories plugin to be extremely handy. I could really use a “backspace” parameter, an “if category_image” condition, and some variable renames to avoid conflicts. Those are just some suggestions. Thanks for a great plugin! 😊

       
Trend Hunter's avatar
Trend Hunter
81 posts
19 years ago
Trend Hunter's avatar Trend Hunter

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}

       
rossh's avatar
rossh
13 posts
19 years ago
rossh's avatar rossh

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

       
David Webb's avatar
David Webb
62 posts
19 years ago
David Webb's avatar David Webb

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.

       
David Webb's avatar
David Webb
62 posts
19 years ago
David Webb's avatar David Webb

Anyone have any ideas on this or if MF is actually around at the moment?

       
MediaGirl Inc.'s avatar
MediaGirl Inc.
186 posts
19 years ago
MediaGirl Inc.'s avatar MediaGirl Inc.

Is anyone else having problems with this plugin while using ExpressionEngine 1.4.0? I’m not getting any output… I have successfully used the plugin in the EE version just before this latest one without any problem.

       
Boyink!'s avatar
Boyink!
5,011 posts
19 years ago
Boyink!'s avatar Boyink!

Working on EE 1.4 with subcategories v.Beta 2, not using category names, not sure if that makes a difference.

       
MediaGirl Inc.'s avatar
MediaGirl Inc.
186 posts
19 years ago
MediaGirl Inc.'s avatar MediaGirl Inc.

Can I ask where you got Beta2? I only see Beta 1 posted on this thread.

       
Boyink!'s avatar
Boyink!
5,011 posts
19 years ago
Boyink!'s avatar Boyink!

It’s here…look for MF’s post of 28 September 2005 02:34 PM. I just opened that one in Notepad and it says Beta 2.

       
MediaGirl Inc.'s avatar
MediaGirl Inc.
186 posts
19 years ago
MediaGirl Inc.'s avatar MediaGirl Inc.

Got it!! Will give it a try.

       
MediaGirl Inc.'s avatar
MediaGirl Inc.
186 posts
19 years ago
MediaGirl Inc.'s avatar MediaGirl Inc.

It worked… A huge thank you for pointing me in the right direction.

       
photek's avatar
photek
15 posts
19 years ago
photek's avatar photek

Hi, i installed beta 2 via FTP to the plugins directory, but it doesn’t appear listed in the plugin manager, is that normal? if not, what i could be doing wrong? i use EE 1.4.0

Thanks in advance for your help.

Regards,

       
photek's avatar
photek
15 posts
19 years ago
photek's avatar photek

Ok, i found out, i feel so stupid. I was saving the file with .txt extension and it has to have .php extension.

Regards.

       
photek's avatar
photek
15 posts
19 years ago
photek's avatar photek

Hi again, i have two questions about plugin itself:

  1. Is there a way to show either the list of subcategories, or the entries list, depending if there is subcategories or not? What i mean in example:

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.

  1. I see in docs root node is optional, but in comments nearly everyone use it. My idea is to make one template for the subcategory listing, used in all the categories, is that possible or it can cause problems?

Thanks in advance for your help.

Regards.

       
1 2 3 4 5 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.