{"id":25176194,"url":"https://github.com/redturtle/collective.navigationtoggle","last_synced_at":"2025-09-18T22:47:54.135Z","repository":{"id":142748263,"uuid":"6668219","full_name":"RedTurtle/collective.navigationtoggle","owner":"RedTurtle","description":"Expand/collapse feature for specific Plone navigation entries, in an unobtrusive way","archived":false,"fork":false,"pushed_at":"2020-05-05T06:34:39.000Z","size":171,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-13T10:06:43.305Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://plone.org/products/collective.navigationtoggle","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedTurtle.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-11-13T09:27:17.000Z","updated_at":"2023-02-18T10:42:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"cee17984-b7d3-4fba-987a-e24c5fb49021","html_url":"https://github.com/RedTurtle/collective.navigationtoggle","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/RedTurtle/collective.navigationtoggle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fcollective.navigationtoggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fcollective.navigationtoggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fcollective.navigationtoggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fcollective.navigationtoggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedTurtle","download_url":"https://codeload.github.com/RedTurtle/collective.navigationtoggle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedTurtle%2Fcollective.navigationtoggle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259624725,"owners_count":22886329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-09T13:16:36.573Z","updated_at":"2025-09-18T22:47:49.066Z","avatar_url":"https://github.com/RedTurtle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":".. contents:: **Table of contents**\n\nIntroduction\n============\n\nScope of this product is to make possible an expand/collapse feature in Plone navigation(s)\nportlet without any modification to the navigation code itself, or any needs to override its features.\n\nThis product *is not* a new navigation portlet, is just a JavaScript add-on that rely on native Plone's\n`jQuery`__ support.\n\n__ http://jquery.com/\n\nMore important: it is only focused to make *some* navigation links to be expandable. \n\nWhen you will like this?\n------------------------\n\nThe collective.navigationtoggle is useful when your Plone site needs (not much) special handling of\nnavigation elements. Sometimes your site structure is someway like this::\n\n    ROOT\n    |\n    |_ FolderWhatever\n    \\_ NotImportantFolder\n       |\n       |_ ImportantFolder1\n       ...\n       \\_ ImportantFolderN\n\nIf you configure your navigation portlet on the site root, users must click on the *NotImportantFolder*\nand reload the whole page to reach the *ImportantFolder*'s section.\nThe site at the *NotImportantFolder* level is not useful... maybe you only give a *folder_listing* view\nor a default page that only say \"Welcome to an important area of the site, please visit the subsection\nyou are looking for...\".\n\nFor the user experience the first click is only a waste of time.\n\nWhat you are looking for can be a client side effect that expand/collapse the folder in the navigation.\nThe *NotImportantFolder* itself is not seen as a real content in your information architecture.\n\nWhat will change\n----------------\n\n.. image:: http://blog.redturtle.it/pypi-images/collective.navigationtoggle/collective.navigationtoggle-0.3.0-01.png/image_mini\n   :align: left\n   :alt: Closed navigation from AUSL site\n   :target: http://blog.redturtle.it/pypi-images/collective.navigationtoggle/collective.navigationtoggle-0.3.0-01.png\n\n.. image:: http://blog.redturtle.it/pypi-images/collective.navigationtoggle/collective.navigationtoggle-0.3.0-02.png/image_mini\n   :align: right\n   :alt: Open navigation from AUSL site\n   :target: http://blog.redturtle.it/pypi-images/collective.navigationtoggle/collective.navigationtoggle-0.3.0-02.png\n\nMake possible that special navigation links will no more move the user to the target section but simply\nshows in the navigation itself all subsections (so the navigation seems like the user really moved to\nthe target folder).\n\nA second click will collapse the section.\n\nDefault page in a folder, elements marked with \"*Exclude from navigation*\" and unwanted\ntype from the ``metaTypesNotToList`` property will be excluded.\n\nThe script try to simulate best at possible a normal portlet navigation behavior.\n\nThe code keeps in mind *graceful degradation*. Browser without JavaScript enabled will simply use basic\nPlone navigation features.\n\nDetailed documentation\n======================\n\nBasic configuration\n-------------------\n\nIn your Plone configuration panel you'll find the new \"*Navigation Toggle settings*\".\n\n.. image:: http://blog.redturtle.it/pypi-images/collective.navigationtoggle/collective.navigationtoggle-0.4.0-01.png/image_preview\n   :alt: Setup of Navigation Toggle configuration\n   :target: http://blog.redturtle.it/pypi-images/collective.navigationtoggle/collective.navigationtoggle-0.4.0-01.png\n\n\nFrom this section you can configure a lot of advanced options, mainly you need to configure:\n\n**Link selectors**\n    A set of URL path suffix like ``/foo1/foo2`` of an *href* attribute for a link.\n    With this example a link like this will be *hit*::\n    \n        \u003ca href=\"http://plonehost/plone/foo1/foo2\"\u003e\n    \n    Commonly only link inside navigation portlet are checked (see the \"*Toggle container classes*\").\n    \n    You can also provide here a complex jQuery expression, for example::\n    \n        li.navTreeItem a\n    \n    If you don't directly provide a selector that match an HTML \u003cA\u003e element, you still need to query for something\n    *inside* that kind of node, for example::\n    \n        li.navTreeItem a.contenttype-folder span\n    \n    In the last example above, only a click of the navigation entry text will trigger the expand/collapse features,\n    while clicking on the icon will keep the default browser behavior.\n\n**Animation delay**\n    The product can enable for you a graphical effect when you expand/collapse items. This is disabled by\n    default.\n\n    To enable it you must change this value to something higher that 0. The value you put there is the time\n    (in millisecond) used for the `slideDown`__ and `slideUp`__ jQuery's effect.\n\n    __ http://api.jquery.com/slideDown/\n    __ http://api.jquery.com/slideUp/\n\n    Simply put it to 0 again (the default) to disable effect.\n\nAdvanced configurations\n-----------------------\n\n**Cache**\n    Check it to perform client side cache of the AJAX request.\n    If disabled a request to the server will be performed for every click on navigations.\n\n**Toggle container classes**\n    A set of CSS classes that mark you navigation elements.\n    Only links inside elements with one of those classes are \"toggleable\".\n    \n    Note that this option is ignored for \"Links selectors\" entries where you used a jQuery\n    expression and not a URL path.\n\n**HTML list type**\n    The type of HTML container element to looks for.\n\n**HTML list item**\n    The type of HTML item element to be generated.\n\nStyles\n------\n\nThis products dynamically adds two new possible CSS classes to ``\u003cli\u003e`` elements that contains links that match\nthe configuration.\n\nClass \"*cnavClosed*\" is added when a special navigation elements is shown on the page and when you close\na subtree.\nWhen a subsection is open, the class \"*cnavOpen*\" is added to the same element.\n\nThe generated substructure is a copy of the main structure given by Plone, but a \"*cnavGenerated*\" class is\nadded to it.\n\nYou can (but this product doesn't) rely on those classes to give additional styles effects in your\nPlone theme.\n\nNot standard navigation (...or portlet... or whatever you want)\n---------------------------------------------------------------\n\nThis products *may* also works on non-standard navigation HTML structure (as the generations on subelement\nis done cloning existing node from the same navigation portlet) but some assumptions are done.\n\nAs the code works almost client side, you can also use it in portlets that are not standard navigation.\nTheoretically you can use it with something that is not even a portlet!\n\nVersions/Dependencies\n=====================\n\nBrowsers\n--------\n\n* Firefox 16 (...probably a new major version will be released while I'm typing this line...)\n* Google Chrome 23 (...same as above...)\n* Opera 12\n* Safari 5.1\n* Internet Explorer 8, 9\n\nPlone\n-----\n\n* Plone 3.3 (classic Plone theme)\n* Plone 4.2 (classic Plone theme and Sunburst)\n* Plone 4.3 (classic Plone theme and Sunburst)\n\nDependencies\n------------\n\n* `simplejson`__ (if using Plone 3)\n* jQuery 1.3 or better\n* `plone.app.registry`__\n\n__ http://pypi.python.org/pypi/simplejson\n__ http://pypi.python.org/pypi/plone.app.registry\n\nCache controls\n==============\n\nToggle configuration are stored in a JavaScript file that your browser and Plone *portal_javascript* tool\nwill probably cache.\n\nWhen changing configuration you can use the \"*Save and invalidate JS cache*\" button.\n\nOther products\n==============\n\nIf you need a complete expand/collapse navigation feature this product is not for you; so take a\nlook at:\n\n* `collective.portlet.explore`__\n* `Solgema.NavigationPortlet`__\n\n__ http://pypi.python.org/pypi/collective.portlet.explore\n__ http://plone.org/products/solgema.navigationportlet\n\nCredits\n=======\n\nDeveloped with the support of:\n\n* `S. Anna Hospital, Ferrara`__\n  \n  .. image:: http://www.ospfe.it/ospfe-logo.jpg \n     :alt: S. Anna Hospital logo\n\n* `Azienda USL Ferrara`__\n\n  .. image:: http://www.ausl.fe.it/logo_ausl.gif\n     :alt: Azienda USL logo\n\nAll of them supports the `PloneGov initiative`__.\n\n__ http://www.ospfe.it/\n__ http://www.ausl.fe.it/\n__ http://www.plonegov.it/\n\nAuthors\n=======\n\nThis product was developed by RedTurtle Technology team.\n\n.. image:: https://www.redturtle.it/redturtle_banner.png\n   :alt: RedTurtle Technology Site\n   :target: http://www.redturtle.it/\n\nSpecial thanks to Yang Hong for massive bug fixing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredturtle%2Fcollective.navigationtoggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredturtle%2Fcollective.navigationtoggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredturtle%2Fcollective.navigationtoggle/lists"}