Navigation root#
Plone has a concept called navigation root which provides a way to root catalog queries, searches, breadcrumbs, and so on in a given section of the site. This feature is useful when working with subsites or multilingual sites, because it allows the site manager to restrict searches or navigation queries to a specific location in the site.
This navigation root information is different depending on the context of the request.
For instance, in a default multilingual site when browsing the contents inside a language folder such as www.domain.com/en
, the context is en
and its navigation root will be /en/
.
In a non-multilingual site, the context is the root of the site such as www.domain.com
and the navigation root will be /
.
To get the information about the navigation root, the REST API has a @navroot
contextual endpoint.
For instance, send a GET
request to the @navroot
endpoint at the root of the site:
GET /plone/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET http://nohost/plone/@navroot -H "Accept: application/json" --user admin:secret
http http://nohost/plone/@navroot Accept:application/json -a admin:secret
requests.get('http://nohost/plone/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain the navigation root information for the site:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot"
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/front-page",
"@type": "Document",
"description": "Congratulations! You have successfully installed Plone.",
"review_state": "private",
"title": "Welcome to Plone",
"type_title": "Page"
}
],
"items_total": 1,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
}
If you request the @navroot
of a given content item in the site:
GET /plone/front-page/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET http://nohost/plone/front-page/@navroot -H "Accept: application/json" --user admin:secret
http http://nohost/plone/front-page/@navroot Accept:application/json -a admin:secret
requests.get('http://nohost/plone/front-page/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain the navigation root information in the context of that content item:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/front-page/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot"
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/front-page",
"@type": "Document",
"description": "Congratulations! You have successfully installed Plone.",
"review_state": "private",
"title": "Welcome to Plone",
"type_title": "Page"
}
],
"items_total": 1,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
}
In a multilingual site, the root of the site will work as usual:
GET /plone/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET http://nohost/plone/@navroot -H "Accept: application/json" --user admin:secret
http http://nohost/plone/@navroot Accept:application/json -a admin:secret
requests.get('http://nohost/plone/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain the navigation root information of the root of the site:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot"
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "English",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/de",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "Deutsch",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/es",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "Espa\u00f1ol",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/fr",
"@type": "LRF",
"description": "",
"review_state": null,
"title": "Fran\u00e7ais",
"type_title": "Language Root Folder"
}
],
"items_total": 4,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
}
In a multilingual site where the language folder is the navigation root, the response has the language folder information:
GET /plone/en/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET http://nohost/plone/en/@navroot -H "Accept: application/json" --user admin:secret
http http://nohost/plone/en/@navroot Accept:application/json -a admin:secret
requests.get('http://nohost/plone/en/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain the navigation root information for the language folder:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/en/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/en/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/en/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/en/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/en/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/en/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/en/@navroot"
},
"translations": {
"@id": "http://localhost:55001/plone/en/@translations"
},
"types": {
"@id": "http://localhost:55001/plone/en/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/en/@workflow"
}
},
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"UID": "00000000000000000000000000000001",
"allow_discussion": false,
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": true,
"expires": null,
"id": "en",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en/assets",
"@type": "LIF",
"description": "",
"review_state": "published",
"title": "Assets",
"type_title": "Language Independent Folder"
},
{
"@id": "http://localhost:55001/plone/en/test-document",
"@type": "Document",
"description": "",
"review_state": "private",
"title": "Test document",
"type_title": "Page"
}
],
"items_total": 2,
"language": {
"title": "English",
"token": "en"
},
"layout": "folder_listing",
"lock": {},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"description": "",
"title": "Plone site",
"type_title": "Plone Site"
},
"previous_item": {},
"review_state": "published",
"rights": "",
"subjects": [],
"title": "English",
"type_title": "Language Root Folder",
"version": "current",
"working_copy": null,
"working_copy_of": null
}
}
In a multilingual site, if the navigation root is requested for content inside a language folder:
GET /plone/en/test-document/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET http://nohost/plone/en/test-document/@navroot -H "Accept: application/json" --user admin:secret
http http://nohost/plone/en/test-document/@navroot Accept:application/json -a admin:secret
requests.get('http://nohost/plone/en/test-document/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response has the language folder information as a navigation root:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/en/test-document/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/en/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/en/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/en/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/en/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/en/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/en/@navroot"
},
"translations": {
"@id": "http://localhost:55001/plone/en/@translations"
},
"types": {
"@id": "http://localhost:55001/plone/en/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/en/@workflow"
}
},
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"UID": "00000000000000000000000000000001",
"allow_discussion": false,
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": true,
"expires": null,
"id": "en",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en/assets",
"@type": "LIF",
"description": "",
"review_state": "published",
"title": "Assets",
"type_title": "Language Independent Folder"
},
{
"@id": "http://localhost:55001/plone/en/test-document",
"@type": "Document",
"description": "",
"review_state": "private",
"title": "Test document",
"type_title": "Page"
}
],
"items_total": 2,
"language": {
"title": "English",
"token": "en"
},
"layout": "folder_listing",
"lock": {},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"description": "",
"title": "Plone site",
"type_title": "Plone Site"
},
"previous_item": {},
"review_state": "published",
"rights": "",
"subjects": [],
"title": "English",
"type_title": "Language Root Folder",
"version": "current",
"working_copy": null,
"working_copy_of": null
}
}
Expansion#
This endpoint can be used with the Expansion mechanism which allows getting more information about a content item in one query, avoiding unnecessary requests.
If a simple GET
request is made on the content item, a new entry will be shown on the @components
entry with the URL of the @navroot
endpoint.
In a standard site when querying the site root:
GET /plone/?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET 'http://nohost/plone/?expand=navroot' -H "Accept: application/json" --user admin:secret
http 'http://nohost/plone/?expand=navroot' Accept:application/json -a admin:secret
requests.get('http://nohost/plone/?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain information of the site root with the navigation expanded:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot"
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/front-page",
"@type": "Document",
"description": "Congratulations! You have successfully installed Plone.",
"review_state": "private",
"title": "Welcome to Plone",
"type_title": "Page"
}
],
"items_total": 1,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/front-page",
"@type": "Document",
"description": "Congratulations! You have successfully installed Plone.",
"review_state": "private",
"title": "Welcome to Plone",
"type_title": "Page"
}
],
"items_total": 1,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
When querying a content item inside the root:
GET /plone/front-page?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET 'http://nohost/plone/front-page?expand=navroot' -H "Accept: application/json" --user admin:secret
http 'http://nohost/plone/front-page?expand=navroot' Accept:application/json -a admin:secret
requests.get('http://nohost/plone/front-page?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain the information of that content item with its navigation root information expanded:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/front-page/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/front-page/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/front-page/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/front-page/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/front-page/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/front-page/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot"
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/front-page",
"@type": "Document",
"description": "Congratulations! You have successfully installed Plone.",
"review_state": "private",
"title": "Welcome to Plone",
"type_title": "Page"
}
],
"items_total": 1,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
},
"types": {
"@id": "http://localhost:55001/plone/front-page/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/front-page/@workflow"
}
},
"@id": "http://localhost:55001/plone/front-page",
"@type": "Document",
"UID": "SomeUUID000000000000000000000001",
"allow_discussion": false,
"changeNote": "",
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"test_user_1_"
],
"description": "Congratulations! You have successfully installed Plone.",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "front-page",
"is_folderish": false,
"language": "",
"layout": "document_view",
"lock": {
"locked": false,
"stealable": true
},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"description": "",
"title": "Plone site",
"type_title": "Plone Site"
},
"previous_item": {},
"relatedItems": [],
"review_state": "private",
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": {
"content-type": "text/plain",
"data": "<p>If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.</p>",
"encoding": "utf-8"
},
"title": "Welcome to Plone",
"type_title": "Page",
"version": "current",
"versioning_enabled": true,
"working_copy": null,
"working_copy_of": null
}
In a multilingual site, it works the same. Use the request:
GET /plone/?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET 'http://nohost/plone/?expand=navroot' -H "Accept: application/json" --user admin:secret
http 'http://nohost/plone/?expand=navroot' Accept:application/json -a admin:secret
requests.get('http://nohost/plone/?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
And the response will contain the navigation root information pointing to the root of the site:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/@navroot"
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "English",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/de",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "Deutsch",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/es",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "Espa\u00f1ol",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/fr",
"@type": "LRF",
"description": "",
"review_state": null,
"title": "Fran\u00e7ais",
"type_title": "Language Root Folder"
}
],
"items_total": 4,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
},
"types": {
"@id": "http://localhost:55001/plone/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/@workflow"
}
},
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"UID": "55c25ebc220d400393574f37d648727c",
"allow_discussion": false,
"contributors": [],
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "plone",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "English",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/de",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "Deutsch",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/es",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "Espa\u00f1ol",
"type_title": "Language Root Folder"
},
{
"@id": "http://localhost:55001/plone/fr",
"@type": "LRF",
"description": "",
"review_state": null,
"title": "Fran\u00e7ais",
"type_title": "Language Root Folder"
}
],
"items_total": 4,
"language": {
"title": "English",
"token": "en"
},
"lock": {
"locked": false,
"stealable": true
},
"parent": {},
"relatedItems": [],
"review_state": null,
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Plone site",
"type_title": "Plone Site"
}
It will also work with language root folders that are navigation roots:
GET /plone/en?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET 'http://nohost/plone/en?expand=navroot' -H "Accept: application/json" --user admin:secret
http 'http://nohost/plone/en?expand=navroot' Accept:application/json -a admin:secret
requests.get('http://nohost/plone/en?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will contain the navigation root information expanded:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/en/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/en/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/en/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/en/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/en/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/en/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/en/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/en/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/en/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/en/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/en/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/en/@navroot"
},
"translations": {
"@id": "http://localhost:55001/plone/en/@translations"
},
"types": {
"@id": "http://localhost:55001/plone/en/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/en/@workflow"
}
},
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"UID": "00000000000000000000000000000001",
"allow_discussion": false,
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": true,
"expires": null,
"id": "en",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en/assets",
"@type": "LIF",
"description": "",
"review_state": "published",
"title": "Assets",
"type_title": "Language Independent Folder"
},
{
"@id": "http://localhost:55001/plone/en/test-document",
"@type": "Document",
"description": "",
"review_state": "private",
"title": "Test document",
"type_title": "Page"
}
],
"items_total": 2,
"language": {
"title": "English",
"token": "en"
},
"layout": "folder_listing",
"lock": {},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"description": "",
"title": "Plone site",
"type_title": "Plone Site"
},
"previous_item": {},
"review_state": "published",
"rights": "",
"subjects": [],
"title": "English",
"type_title": "Language Root Folder",
"version": "current",
"working_copy": null,
"working_copy_of": null
}
},
"translations": {
"@id": "http://localhost:55001/plone/en/@translations"
},
"types": {
"@id": "http://localhost:55001/plone/en/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/en/@workflow"
}
},
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"UID": "00000000000000000000000000000001",
"allow_discussion": false,
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": true,
"expires": null,
"id": "en",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en/assets",
"@type": "LIF",
"description": "",
"review_state": "published",
"title": "Assets",
"type_title": "Language Independent Folder"
},
{
"@id": "http://localhost:55001/plone/en/test-document",
"@type": "Document",
"description": "",
"review_state": "private",
"title": "Test document",
"type_title": "Page"
}
],
"items_total": 2,
"language": {
"title": "English",
"token": "en"
},
"layout": "folder_listing",
"lock": {},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"description": "",
"title": "Plone site",
"type_title": "Plone Site"
},
"previous_item": {},
"review_state": "published",
"rights": "",
"subjects": [],
"title": "English",
"type_title": "Language Root Folder",
"version": "current",
"working_copy": null,
"working_copy_of": null
}
And also for content inside the language root folders:
GET /plone/en/test-document?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET 'http://nohost/plone/en/test-document?expand=navroot' -H "Accept: application/json" --user admin:secret
http 'http://nohost/plone/en/test-document?expand=navroot' Accept:application/json -a admin:secret
requests.get('http://nohost/plone/en/test-document?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
The response will include the expanded information pointing to the language root:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/en/test-document/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/en/test-document/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/en/test-document/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/en/test-document/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/en/test-document/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/en/test-document/@navroot",
"navroot": {
"@components": {
"actions": {
"@id": "http://localhost:55001/plone/en/@actions"
},
"aliases": {
"@id": "http://localhost:55001/plone/en/@aliases"
},
"breadcrumbs": {
"@id": "http://localhost:55001/plone/en/@breadcrumbs"
},
"contextnavigation": {
"@id": "http://localhost:55001/plone/en/@contextnavigation"
},
"navigation": {
"@id": "http://localhost:55001/plone/en/@navigation"
},
"navroot": {
"@id": "http://localhost:55001/plone/en/@navroot"
},
"translations": {
"@id": "http://localhost:55001/plone/en/@translations"
},
"types": {
"@id": "http://localhost:55001/plone/en/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/en/@workflow"
}
},
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"UID": "00000000000000000000000000000001",
"allow_discussion": false,
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"admin"
],
"description": "",
"effective": null,
"exclude_from_nav": true,
"expires": null,
"id": "en",
"is_folderish": true,
"items": [
{
"@id": "http://localhost:55001/plone/en/assets",
"@type": "LIF",
"description": "",
"review_state": "published",
"title": "Assets",
"type_title": "Language Independent Folder"
},
{
"@id": "http://localhost:55001/plone/en/test-document",
"@type": "Document",
"description": "",
"review_state": "private",
"title": "Test document",
"type_title": "Page"
}
],
"items_total": 2,
"language": {
"title": "English",
"token": "en"
},
"layout": "folder_listing",
"lock": {},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone",
"@type": "Plone Site",
"description": "",
"title": "Plone site",
"type_title": "Plone Site"
},
"previous_item": {},
"review_state": "published",
"rights": "",
"subjects": [],
"title": "English",
"type_title": "Language Root Folder",
"version": "current",
"working_copy": null,
"working_copy_of": null
}
},
"translations": {
"@id": "http://localhost:55001/plone/en/test-document/@translations"
},
"types": {
"@id": "http://localhost:55001/plone/en/test-document/@types"
},
"workflow": {
"@id": "http://localhost:55001/plone/en/test-document/@workflow"
}
},
"@id": "http://localhost:55001/plone/en/test-document",
"@type": "Document",
"UID": "SomeUUID000000000000000000000001",
"allow_discussion": false,
"changeNote": "",
"contributors": [],
"created": "1995-07-31T13:45:00+00:00",
"creators": [
"test_user_1_"
],
"description": "",
"effective": null,
"exclude_from_nav": false,
"expires": null,
"id": "test-document",
"is_folderish": false,
"language": {
"title": "English",
"token": "en"
},
"layout": "document_view",
"lock": {
"locked": false,
"stealable": true
},
"modified": "1995-07-31T17:30:00+00:00",
"next_item": {},
"parent": {
"@id": "http://localhost:55001/plone/en",
"@type": "LRF",
"description": "",
"review_state": "published",
"title": "English",
"type_title": "Language Root Folder"
},
"previous_item": {},
"relatedItems": [],
"review_state": "private",
"rights": "",
"subjects": [],
"table_of_contents": null,
"text": null,
"title": "Test document",
"type_title": "Page",
"version": "current",
"versioning_enabled": true,
"working_copy": null,
"working_copy_of": null
}