• 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!!

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter roblgs

    (@roblgs)

    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

    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?

    Thread Starter roblgs

    (@roblgs)

    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

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Foldable Category Lists for WP 1.5’ is closed to new replies.