WordPress.org

Ready to get started?Download WordPress

Forums

Foldable Category Lists for WP 1.5+ (19 posts)

  1. roblgs
    Member
    Posted 9 years ago #

    I have a first (alpha) release of a new plugin that will provide collapsable functionality for the category list usually found in the sidebar.

    Similar (a companion) to the Fold Page List plugin developed previously, this plugin will collapse a list of nested categories to just the top level parents. If a selected category has children then the top level of those children will be listed under their selected parent, but all other top levels parents will be collapsed to just their top levels.

    Thus a category hierarchy that contains this:

    Land
    - Europe
    - Americas
    - North
    - South
    - Asia
    Water
    - Fresh
    - Salt

    Would naturally collapse to just

    Land
    Water

    If nothing were selected.

    Selecting Land would list:

    Land
    - Europe
    - Americas
    - Asia
    Water

    And so on, expanding only those parts that are relevant to the path to the currently selected (sub-)category.

    This is an 'alpha' release because it so far lacks attention to differential styling for selected categories, and also for carrying that 'selection' up to the topmost parent. I hope to add this before releasing the 1.0 version.

    Information regarding functionality, installation and use is available from the Fold Category List Plugin page.

    Enjoy!!

  2. ekp23
    Member
    Posted 8 years ago #

    I've recently installed both the fold pages and fold cats plugins for my new WordPress installation (using Neptune 3 column theme). Fold pages works great, but for some reason I can't get fold cats to work. What's also weird is that if I just use the stock wp_list_cats()I get an expanded hierarchical display, but once I replace it with wswwpx_fold_category_list() not only do I not get the fold effect but I also lose the hierarchical display - everything shows up as items in the same unordered list. I've tried forcing the ('hierarchical=1')even though it's the default but still nothing. So it's like I'm getting the reverse effect of what I want when I activate the plugin. Anyone else experiencing this? BTW I've checked the really obvious stuff: plugin is activated and I've checked permissions.

  3. jaacob
    Member
    Posted 8 years ago #

    I've got the same result with this plugin - it also loses it's sort order - so even though I have it set to sort by name, it changes it to ID, along with losing the hierarchical view.

  4. abberdab
    Member
    Posted 8 years ago #

    I have the same problem as ekp23 and jaacob. I'm glad to see that I am not alone!

  5. roblgs
    Member
    Posted 8 years ago #

    Hi,
    Thanks for the feedback and apologies for the delay in responding.

    Fold Page List was an easier adaptation than folding categories and the fold category list plugin remains in its original alpha state as I have been rather pressed for time to work on it.

    I'm grateful for the feedback to this forum, but wish I had seen it earlier. There is contact information in the header to the plugin and quicker replies will come from direct contact as I'm not always watching this forum.

    I'm hoping to find some time though to work on changes over the next couple of weeks, and to at least raise the plugin to beta status within that period.

    Thanks for the interest, and the feedback

    Best regards

    Rob

  6. roblgs
    Member
    Posted 8 years ago #

    Hi,

    I have posted an update to the plugin at the Fold Category List support page that should fix the broken functionality under WP1.5.2.

    Both sort order and folding behaviours are working correctly for this plugin under the current release version of WP.

    Please let me know if there are other issues that this fix does not address.

    Best regards

    Rob

  7. estjohn
    Member
    Posted 8 years ago #

    Ohhh much better... But, right now I can still only get the main category to show up.. if I click on a category, it will goto the category, but it will not expand the list...

    http://www.aleeya.net

    I am using <?php wswwpx_fold_category_list ('sort_column=name'); ?> in the sidebar_left

    'sort_column=name'
    is what i had before, so i thought i should use it with this.
    I will go back and play w it some more. I do like the improvements.. I could not get it to list anything before!

    I really appreciate the efforts on this.. my list has goten huge and I needed a way to make it smaller for the categories!

  8. allthewhile
    Member
    Posted 8 years ago #

    Great plugin. I'd like to see a fold archives plugin as well. I have tons and tons of archives i'd like to nicely fold away.

  9. roblgs
    Member
    Posted 8 years ago #

    Following yesterday's build there were a couple of problems identified with regard to plugin functionality when run with permalinks enabled. These have been fixed and a general clean-up/reorganisation of the code completed, so that at long last the plug-in can be launched as a beta version.

    The new version can be accessed (as usual) through the the Fold Category List support page.

    One note, also on that page, is that for reliable folding to occur through your entire hierarchy is that 'hide_empty' should be disabled (it's on by default), otherwise any categories that lie below an otherwise empty category will also be hidden in the category list, along with their empty parent.

    The call in my test sidebar currently reads:

    <?php wswwpx_fold_category_list('sort_column=name&hierarchical=1&hide_empty=0'); ?>

    for anyone who may be interested.

    Best regards

    Rob

  10. estjohn
    Member
    Posted 8 years ago #

    now I get
    Warning: in_array(): Wrong datatype for second argument in /(path)/fold_category_list.php on line 337

    :(

  11. roblgs
    Member
    Posted 8 years ago #

    Hi estjohn,

    Thanks for pointing this out.

    It should be fixed now... ancestors array wasn't being initialised in all cases. The link is the same as above, but the support page and zip archive are updated to beta 2.

    If you have any further problem, please contact me directly using the email in the head of the plugin.

    Cheers

    Rob

  12. Arlo
    Member
    Posted 8 years ago #

    This looks like an interesting plugin, but I notice that when you click the parent category, it actually goes to that category first.

    I would like to see this behave more as a standard hierarchy tree; that is, if I click on an arrow widget next to the parent, it expands the tree, without jumping to the category. Is this possible?

  13. roblgs
    Member
    Posted 8 years ago #

    Hi,

    I understand the functionality you want, but the short answer is unfortunately, in its current form, no.

    To do what you are after would require a more significant re-write than I currently have time to spare.

    I can though put it on the todo list, but it might be a while before I get a large enough time-window.

    Regards

    Rob

  14. mpatino
    Member
    Posted 8 years ago #

    I love this plugin!! Thanks so much, I have used it to great effect at http://www.mhsymp.com, so thanks again!

  15. nandamai
    Member
    Posted 8 years ago #

    Rob, this plugin is great, and I'm glad to find it works perfectly in 2.0. Thank you!

    I'd like to put in another vote for Arlo's request, though -- to have the parent category expand to the children when you click on it, without going to the parent category page. When you have the time to get into it, obviously. :)

  16. roblgs
    Member
    Posted 8 years ago #

    Hi Nandamai,

    Thanks for your comments and vote for new features... This is becoming a popular request, so I will look at creating the time to get it done... just not in the next week or three, I'm afraid.

    Also... a big "Whoops!" on my part... The download link on the Fold Category List support page was, for some reason, still giving the old version (1.0b2 - November 8, 2005). This has now been updated to download the real current version, 1.0b3, dated 5 January, 2006.

    This should resolve any permalink problems under WP2.0.

    Apologies all round

    Rob

  17. roblgs
    Member
    Posted 8 years ago #

    Hi,

    I've just posted an update on the Fold Category List support page, bringing the version to 1.0b4.

    This is a feature enhancement, allowing for controlled category truncation for use as link titles, whilst retaining access to the full category descriptions for use in content for pages.

    There are three elements to this capability.

    1. Embed the short description into the beginning of the description field and mark its end with a unique marker (e.g. '||')
    2. Pass that marker through to the wswwpx_fold_category_list template tag so that it can extract the short description
    3. Provide an alternative template tag for display of full category descriptions, after first stripping any embedded short description.
    4. The marker string (dividing the short description from the full description) can be anything you wish. Full details are on the support page (see above)

      Best regards

      Rob

  18. LeahCunningham
    Member
    Posted 8 years ago #

    I am using your plugin and it works quite well, but I am trying to figure out how I could hack in some identification tags for parents. I see that children are identified with class='children' for the

      tag. I would love to be able to identify parents as well with something like <li class="parent"> or similar. I've tried adding some checks to the code that creates the category <li's> to do


      if (in_array($category->cat_ID, $all_ancestors)) {
      //try add class="parent"
      }

      But I can't seem to get it to work. Any ideas for how to ID parents and add a class tag?

  19. roblgs
    Member
    Posted 8 years ago #

    Hi,

    I need to extend the plugin to support the hierarchy that fold_page_list does. Top-down that would be:

    Ancestor -> parent -> current

    It's on the to-do list

    Best regards

    Rob

Topic Closed

This topic has been closed to new replies.

About this Topic