WordPress.org

Ready to get started?Download WordPress

Forums

Expandable Menus
[resolved] How can we load with auto-fold ON ? (8 posts)

  1. nesociety
    Member
    Posted 1 year ago #

    The pluggin work fine with 3.5, however I had a question. I did not go through your code, but is there anyway we can have a small options (checkbox) to allow to load the menu page with all items folded ?

    To go futher, I would allow a certain X level to be automaticly folded, example, level 2 and up, could be automaticly folded. That would just be awesome.

    http://wordpress.org/extend/plugins/expandable-menus/

  2. Maxaud
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm, not sure.
    Plugin needs to be rewritten to better support this.

    You may be able to do the following but it's untested.

    on line 122 of the plugin file you could probably add the following to automatically trigger the collapse on page load:

    jQuery("#menu-to-edit .item-edit").trigger( "dblclick" );

    this would be right after this line:
    jQuery("#menu-to-edit li").on( "dblclick", the_expand_function );

    The above would collapse all elements.

  3. Maxaud
    Member
    Plugin Author

    Posted 1 year ago #

    A new version will be released today that will save the folded menus in a browser cookie. On page load it will minimize the menus you have saved in that cookie.

  4. nesociety
    Member
    Posted 1 year ago #

    Thank you, I will test it before the weekend, Im adding a scheduled event to test it. Thank you very much

    PS: Say we have a huge site with alot of menu already, could we force the cookie value to fold everything by default (to start with?)

    That would be amazing, event if that a button we have to press in the options page of the pluggin.

    Thank you !

  5. Maxaud
    Member
    Plugin Author

    Posted 1 year ago #

    I'll consider this for the next version, wouldn't be too hard to put a button on the page that says minimize all, sets a cookie and reloads the page.

  6. nesociety
    Member
    Posted 1 year ago #

    That would really be amazing, but none the less, as you say it ok for a next release. I guess the trick for now will to fold all second level categories, which there not a ton neither, it especially the third and fourt level that become problematic depending on your categories tree. say that you have like 10-15 subcategory (level 2), then 15-20 on level 3 and something a few in a level 4. Perhaps you can imagine the problem when it load all expanded.

    I dont even understand why this is not a basic feature of WP (As far as managing menu (specially custom menu)).

  7. nesociety
    Member
    Posted 1 year ago #

    Thank again for your collaboration

  8. Maxaud
    Member
    Plugin Author

    Posted 1 year ago #

    No problem, glad I could help.

    Yeah, large menus can be a pain.. that's why this plugin was created in the first place.

    The new version also states how many items are in the minimized parent so that should help.

    Let me know if you encounter any issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.