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

The start of a plugin: Recursive Subcategories

Development and Programming

circa1977's avatar
circa1977
118 posts
16 years ago
circa1977's avatar circa1977

It’s definitely flakey, and I apologize that I haven’t had more time to nurture this plugin. The latest version should be parameterized. The earliest version did have the ID hardcoded for testing.

       
circa1977's avatar
circa1977
118 posts
16 years ago
circa1977's avatar circa1977

Updated without hardcoded ID, as Ryan indicated. Argh.

When I last left off the output tags weren’t working consistently, and I was only available to get one out at a time.

       
circa1977's avatar
circa1977
118 posts
16 years ago
circa1977's avatar circa1977
I don’t think I can get this working at all. Here’s my code:
{exp:recursive_subcategories parent_id="111" show_parent="1" sort_by="cat_order" 
style="linear"}{category_name}{/exp:recursive_subcategories}
This is embedded in a loop. I was embedding the first parameter, but decided to hardcode it instead just to get something to show up. I consistently get one result, which is category 29’s title. Utterly baffled about that. Weird thing is: parent_id=”29” is what’s used in the example inside the plugin itself.

I have gotten the full list of categories when testing the tag. I have not tested when embedded in a loop. I’ve had problems myself with code embedded in loops in other contexts before.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

Mark - Is the latest version in the first post? Has the same version number, so I never know if that means something new has been uploaded or not.

       
circa1977's avatar
circa1977
118 posts
16 years ago
circa1977's avatar circa1977

Sorry, I considered this to be a correction rather than a version, though it should have probably been tracked as an increment. Ah, using forums for version control. I want Git to work in my Versions app.

Anyway, yes, I updated the top post: 1.10.

       
circa1977's avatar
circa1977
118 posts
16 years ago
circa1977's avatar circa1977

Fork you all. It’s now on Git: http://github.com/slimkiwi/sk.recursive_subcategories.ee_addon/tree

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

Mark, I forked the repository and added the ability to return category_url_title and category_description. So this plugin is working for me now and is a lifesaver, thanks.

I sent you a Pull Request on GitHub - so that should give you some practice merging my tweak/update back into the main plugin. That is, if you deem my contribution worthy.

Here’s my forked version at GitHub.

       
csaturkey's avatar
csaturkey
2 posts
16 years ago
csaturkey's avatar csaturkey

i wish it would include “76|23|765” style combination like the original ee tags and also custom category fields (as i use these for localization of titles)

       
daulex's avatar
daulex
152 posts
15 years ago
daulex's avatar daulex

Sounds awesome, but I can’t get it to show up at all.

EE 2.0 (20100121), tried in third party, in a folder named as the plugin under third party, in plugins, etc. Does not show up at all.

Halp!

       
ender's avatar
ender
1,644 posts
15 years ago
ender's avatar ender

this plugin is made for EE 1.x, and would need to be updated somewhat to work with 2.x.

       
daulex's avatar
daulex
152 posts
15 years ago
daulex's avatar daulex

I guessed that, but prayed that it wasn’t the case. Any experts wanna upgrade this “for the community”? There are less than 200 lines of actual code.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

It probably isn’t too difficult to do - I don’t think this is a really complex add-on. The Adventures in Updating an ExpressionEngine Plugin from 1.6.8 to 2.0 article explains the basics, with links to the EE documentation.

       
daulex's avatar
daulex
152 posts
15 years ago
daulex's avatar daulex

Ryan,

I forked your fork on github (as it has the function I need), went through the link provided and modified all the things that I thought were required, however it’s still not showing up. (I’m very new to ee, so I must have missed something dead basic.)

Any chance you could have a look?

http://github.com/daulex/sk.recursive_subcategories.ee_addon

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

I’m still really unfamiliar with EE2. I’ve hardly ever even touched it at this point.

I’m just too busy at the moment to look into something that isn’t directly related to my work at hand.

       
daulex's avatar
daulex
152 posts
15 years ago
daulex's avatar daulex

No problem, I understand, I ended up using a workaround that involves the query module and jquery 😊

       
1 2

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.