Skip to main content

Helper package to setup a RedTurtle's Plone site ready to work with Volto.

Project description

This is an helper package that setup a RedTurtle’s Plone site ready to work with Volto.

Features

Content-types

  • Disabled Collection

  • Document are now folderish (thanks to collective.folderishtypes.dx)

  • Plone Site is a DX content

  • Revert News Item and Event to be non-folderish (collective.folderishtypes.dx makes them folderish)

Blocks

volto.blocks behavior is enabled by default for these content-types:

  • Document

  • News Item

  • Event

@context-navigation endpoint

plone.restapi’s @navigation endpoint always return the navigation tree from the site root.

There is a @context-navigation endpoint that returns the contextual navigation tree:

> curl -i http://localhost:8080/Plone/folder?context-navigation -H ‘Accept: application/json’

This is the result:

{
    '@id': 'http://localhost:8080/Plone/folder',
    'items': [
        {'@id': 'http://localhost:8080/Plone/folder/folder-a',
            'description': '',
            'title': 'Folder A'},
        {'@id': 'http://localhost:8080/Plone/folder/folder-b',
            'description': '',
            'title': 'Folder B'},
        {'@id': 'http://localhost:8080/Plone/folder/folder-c',
            'description': '',
            'title': 'Folder C'}
    ]
}

By default only first level is shown. You can pass an expand.navigation.depth parameter to set the depth:

> curl -i http://localhost:8080/Plone/folder?context-navigation?expand.navigation.depth=2 -H 'Accept: application/json'

And this is the result:

{
    '@id': 'http://localhost:8080/Plone/folder',
    'items': [
        {
            '@id': 'http://localhost:8080/Plone/folder/folder-a',
            'description': '',
            'items': [
                {
                    '@id': 'http://localhost:8080/Plone/folder/folder-a/folder-aa',
                    'description': '',
                    'title': 'Folder AA',
                },
                {
                    '@id': 'http://localhost:8080/Plone/folder/folder-a/folder-ab',
                    'description': '',
                    'title': 'Folder AB',
                },
            ],
            'title': 'Folder A',
        },
        {
            '@id': 'http://localhost:8080/Plone/folder/folder-b',
            'description': '',
            'title': 'Folder B',
        },
        {
            '@id': 'http://localhost:8080/Plone/folder/folder-c',
            'description': '',
            'title': 'Folder C',
        },
    ],
}

@site-search endpoint

This endpoint works exactly like @search but take care of types not searchable settings.

Installation

Install redturtle.volto by adding it to your buildout:

[buildout]

...

eggs =
    redturtle.volto

and then running bin/buildout

Contribute

License

The project is licensed under the GPLv2.

Authors

This product was developed by RedTurtle Technology team.

RedTurtle Technology Site

Contributors

Changelog

0.1.2 (2020-05-25)

  • Revert to Event and News Item default behaviors. [cekk]

0.1.1 (2020-05-22)

  • Install also collective.volto.cookieconsent. [cekk]

0.1.0 (2020-05-22)

  • Initial release. [cekk]

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

redturtle.volto-0.1.2.tar.gz (25.5 kB view hashes)

Uploaded Source

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