Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

http://img.shields.io/pypi/v/collective.restapi.navigationtree.svg https://img.shields.io/travis/collective/collective.restapi.navigationtree/master.svg https://img.shields.io/coveralls/collective/collective.restapi.navigationtree/master.svg

This Plone plugin provides a REST endpoint to query the site’s navigation tree. The endpoint name is @navigationtree, and can be considered an extension to plone.restapi’s @navigation endpoint, since the latter only returns the top level navigation menu items. collective.restapi.navigationtree depends on the webcouturier.dropdownmenu plugin to build the navigation tree, and honors the same configuration settings as webcouturier.dropdownmenu. Thus, the maximum depth of the tree can be set in the webcouturier.dropdownmenu configlet.

Tested on Plone 4.3, 5.0 and 5.1 with Archetypes and Dexterity.

Features

  • Simply GET @navigationtree

  • Extends the @navigation endpoint of plone.restapi by building a full navigation tree of the site, instead of limiting itself to just the top level navigation menu.

  • Depends on webcouturier.dropdownmenu, thus is ideal for sites that already use this plugin for their navigation menu.

  • Honors all the configuration settings in Plone’s _Navigation_ control panel.

  • Honors all the configuration settings in @@dropdown-controlpanel.

  • In particular, you can set the depth of the navigation tree in webcouturier.dropdownmenu’s configlet.

Examples

Getting the navigation tree:

GET /plone/@navigationtree HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

(Authorization is optional.)

Example response:

{
    "@id": "http://localhost:8080/Plone/@navigationtree",
    "items": [
        {
            "@id": "http://localhost:8080/Plone",
            "description": "",
            "items": "",
            "title": "Home"
        },
        {
            "@id": "http://localhost:8080/Plone/news",
            "description": "Site News",
            "items": [
                {
                    "@id": "http://localhost:8080/Plone/news/some-news",
                    "description": "",
                    "title": "Some News"
                }
            ],
            "title": "News"
        },
        {
            "@id": "http://localhost:8080/Plone/events",
            "description": "Site Events",
            "items": [],
            "title": "Events"
        },
        {
            "@id": "http://localhost:8080/Plone/Members",
            "description": "Site Users",
            "items": [],
            "title": "Users"
        }
    ]
}

Installation

Install collective.restapi.navigationtree by adding it to your buildout:

[buildout]

...

eggs =
    collective.restapi.navigationtree

and then running bin/buildout. This will automatically install webcouturier.dropdownmenu and plone.restapi, so you should pin the versions of these add-ons according to the version of Plone you are running.

Contribute

Support

If you are having issues, please let us know in the issue tracker.

License

The project is licensed under the GPLv2.

Contributors

Changelog

1.0a1 (2018-03-12)

  • Initial release. [fulv]

Metadata

Release files for collective.restapi.navigationtree 1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.restapi.navigationtree 1.0a1
File Size Uploaded Provenance
collective.restapi.navigationtree-1.0a1.tar.gz 11.5 kB Without provenance Details

Release files / collective.restapi.navigationtree-1.0a1.tar.gz

Download URL collective.restapi.navigationtree-1.0a1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
805eff65f58fd1ac3d20997b7fc5a374664c92c7b13659ab5df5993c7e5bc05b
BLAKE2b-256 checksum
How to use checksums
ff3606e1174a6934983f8a525c5e397cefa001626ad99a7dc3ff6a1ff7eececa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for collective.restapi.navigationtree 1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page