Forum Replies Created

Viewing 15 replies - 76 through 90 (of 90 total)
  • Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    Thanks for the note about xhtml validation… the output of closing tag on each list item was wrongly nested with respect to an extra ‘if’ block in the function generating the output, so wasn’t being written into the xhtml. Silly error… fixed!

    New beta (1.0b4 [rc1]) now available

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    How are you calling the tag? Should look something like this:

    wswwpx_fold_page_list (‘depth=2’);

    contained within php delimiters and probably inside sidebar.php for your active theme.

    The ‘depth=2’ part can be replaced with any of the arguments you would normally use with wp_list_pages

    Take a look at the new Fold Page List plugin announced on this threadwww.ads-software.com/support/topic/31760.

    You might like to look at Fold Page List Plugin.

    This is a replacement for wp_list_Pages that ‘folds’ those parts of the page list that are not relevant to the current page, but leaves all other top level pages visible for navigational purposes.

    b3 is (probably) the final beta before making a formal release of it. I’d be interested in feedback.

    The wp_list_pages tag with the child_of argument set to the id of the page whose children you want to display will do the job you describe, but will not display any page outside of that subset of pages.

    Depending on how you want to set things up, that may be what you are looking for,

    An alternative would be to display the page list in a way that collapses all pages other than the current one, and this can be done with the Fold Page List plugin, designed as a replacement for wp_list_pages.

    Might be worth a try

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    OK, I think I’ve fixed it… the error was occuring when there was no page ID provided from which to determine ancestry, so no array of ancestors.

    A version fixing this problem, fold_page_list v1.0b3 is now available.

    Let me know if this works for you.

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    Henrik,

    Can you contact me at the email address in the header of the file. I think I have a fix, but am unable to duplicate the problem (which is odd, because I think I know the cause!! The error messages were most helpful in that regard).

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    Oops again… this is embarassing… what comes of trying to do too much all at the same time, and not checking…

    Get rid of the question mark in the call, so that it reads:

    wswwpx_fold_page_list (‘depth=2’);

    As per wp_list_pages syntax.

    That should work… honest!

    The test install I have running is also at the domain root, not in a subdirectory, so that arrangement should not have any negative effect, and anyway, fold_page_list is intended to work exactly the same way as the wp_list_pages tag, upon which it is based.

    Many apologies for the previous wrong info.

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    Oops!

    Thanks for pointing this out. An embarassing ‘cut-n-paste’ introduced bug that wasn’t being trapped in my testing… now fixed.

    Download fold_page_list v1.0b2 here.

    Also, my reference to:

    wswwpx_fold_page_list (‘?level=2’);

    should read:

    wswwpx_fold_page_list (‘?depth=2’);

    But shouldn’t have contributed to the problem you encountered.

    Whipes egg from face!

    Let me know if that fixes it for you.

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    Probably in sidebar.php of your theme, wherever you are calling wp_list_pages, you could add ‘&level=1’ to the end of your arguments list… or ‘?level=1’ if you don’t currently use any arguments.

    Alternatively, using the fold page list plugin, use the following:

    wswwpx_fold_page_list (‘?level=2’);

    in place of wp_list_pages. The value of 2 means ‘parents and children as far as 1st generation’… but the expansion will only be on the currently selected parent, all others should collapse.

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    The first para is exactly what fold page list is meant to do, but clicking one of the parent pages will load that page, and expand that part of the page list, but the page itself is empty, which feels odd.

    Fold page list works off the current request id, in this case the id of the currently loaded page, to determine what gets compressed/expanded. Fold page list does not expand/contract in-place since it is not javascript based, which sounds more like what you are looking for.

    One way around this might be to have it such that the parent pages act as an introduction to that section/group of articles… at least that would get away from the empty page scenario, but with a tidier page list on each load.

    Does that make sense?

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    OK, so at which point do you wish to collapse to… or is it more a question of excluding parent pages for which there are no children?

    If it is more driven by ‘the page exists, but the article not yet written’, then it becomes content related (rather than structure) and outside the scope of this plugin… at least in its current form.

    I’d like though to understand further, but it seems as if your implementation through pages is somewhat duplicating behaviour that might more easily be provided through the categories/posts mechanism of the blog side of things… including future posting…. Not a criticism, just an observation.

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    How were you doing this (listing them) previously? The plugin is, in many ways, a replacement for wp_list_pages, so whatever worked with that should, I think, work with this… yours though is one scenario that hasn’t been tested for, and I hadn’t in fact even considered.

    Do you mean pages that are within your hierarchy, but for which there is no content yet?? Can you explain a little more?

    Forum: Plugins
    In reply to: Foldable page list (WP 1.5)
    Thread Starter roblgs

    (@roblgs)

    Apologies… I seem unable to now edit the post, but vkaryl has posted the correct link. Thanks

    For anyone wanting to get the folding of page lists working, I have posted a plugin that does just that, by extending the functionality provided by wp_list_pages in a new template tag, wswwpx_fold_page_list.

    In principal this could be used as a replacement for wp_list_pages since in essence it is simply a modified version of that tag. It should (this is not fully tested) support all the functionality of wp_list_pages, and its accepted arguments are identical to that template tag.

    One slight modification of behaviour, when specifying a non-zero ‘child_of’, this function will return all descendants, not just those of the first generation… the visibility of subsequent generations is handled by the ‘level’ argument.

    I have currently only placed this on my website, but will move it to the plugins repository shortly.

    A page explaining installation and use, and a link to a downloadable zip archive is available at https://www.webspaceworks.com/wp-plugins/foldpagelist.html.

    I’d welcome any feedback…

Viewing 15 replies - 76 through 90 (of 90 total)