You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, you can provide a routers query parameter to the API and it will "resolve" urls for documents and links with this information on the server returning the urls in the payload.
This means that all types would possibly contain a top-level url property and url may also be present in links that have Document type.
… but it looks like you can provide router config during initialisation and then reuse the config for every request thereafter. I assume that the config will be included in the meta-data payload as default options for the forms property.
Currently, it looks like routers should be specified as a JSON array of objects, something like this:
letrouters=[{"type": "my-type",// Name of document type"path": "/products/:range/:category/:uid",// Where ":category" is the UID of the linked category document and ":range" is the UID of the grandparent category.range document"resolvers": {"category": "parent-category",// Top-level content relationship to a "category" type where "parent-category" is the property name of "my-type""range": "category.range"// "range" is a property of "category" in this example being a content-relationship to a range document.}},{"type": "blog-post","path": "/:lang/blog/:uid"// :lang is the document locale ie 'en-gb'},// Not yet known whether other types/properties are feasible such as{"type": "whatever","path": "/:id/:date-published/:tags"// <- Who knows?}];
The text was updated successfully, but these errors were encountered:
Result sets over multiple pages from queries where the routes parameter has been provided do not include the route configuration in the URLs for the next and previous pages. This makes those URLs effectively useless.
Apparently, you can provide a
routers
query parameter to the API and it will "resolve" urls for documents and links with this information on the server returning the urls in the payload.This means that all types would possibly contain a top-level
url
property andurl
may also be present in links that have Document type.The documentation is pretty scant:
… but it looks like you can provide router config during initialisation and then reuse the config for every request thereafter. I assume that the config will be included in the meta-data payload as default options for the
forms
property.Currently, it looks like routers should be specified as a JSON array of objects, something like this:
The text was updated successfully, but these errors were encountered: