Skip to main content

Plone add-on to add AJAX navigation

Project description

Add AJAX navigation to a Plone site.

This is probably not the most advanced or state-of-the-art way to add AJAX navigation; for Plone 5, I was told about plone.patternslib, based on patternslib.

For Volto sites, the whole jQuery-based handling might be obsolete because of the use of React.js.

At the time of this writing, those were no options for me since I was still on Plone 4.3. Thus, I needed a working solution. Depending on the quality, I’ll switch to some Plone-5-ish solution when doing the leap, or I’ll stick with my own.

The general idea is:

  • Catch the onclick event for every a element on the page.

  • For some links, a special check will tell to proceed with the standard behaviour, i.e. load the target the standard way; this includes:

    • Link targets outside of the current site (another hostname is given)

    • Management pages (e.g. starting with manage_)

    • Other pages which don’t load the navigation links etc. anyway, or wouldn’t work when loaded via AJAX

    • Anchor elements with certain attributes

    • Views for contexts which don’t have a suitable embedable view yet.

    For such link targets, this function will simply return true, and the page is loaded in the standard way.

  • If that check function says, “let’s load the target via AJAX”, it will look for certain elements on the page and try to update them:

    • content

    • breadcrumbs

    • title

    It will also set the page url accordingly, allowing for the browser history.

Features

  • Can be bullet points

Examples

This add-on is currently under development and not yet used on public internet sites.

Documentation

Full documentation for end users can be found in the “docs” folder.

Installation

Install visaplan.plone.ajaxnavigation by adding it to your buildout:

[buildout]

...

eggs =
    visaplan.plone.ajaxnavigation

and then running bin/buildout

Contribute

Support

If you are having issues, please let us know; please use the issue tracker mentioned above.

License

The project is licensed under the GPLv2 (or later).

Contributors

Changelog

1.0.dev1 (unreleased)

  • Initial release. [tobiasherp]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

visaplan.plone.ajaxnavigation-1.0.dev4.tar.gz (30.7 kB view details)

Uploaded Source

File details

Details for the file visaplan.plone.ajaxnavigation-1.0.dev4.tar.gz.

File metadata

  • Download URL: visaplan.plone.ajaxnavigation-1.0.dev4.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.5

File hashes

Hashes for visaplan.plone.ajaxnavigation-1.0.dev4.tar.gz
Algorithm Hash digest
SHA256 1ec6adc774f41ecd5e97e552683d50adfddf805fd0f6567a8997a6e77660713a
MD5 659c6abc79df61f9fed6d51c59bd6845
BLAKE2b-256 8f15d1f79ff4f28be37df5da66925354226a9e75554e07db8c887b84f4e01905

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page