URI Object Resolution on Detail Pages
When using a Structr Page as a Detail Page for a single object, the keyword current provides access to the object requested by the user. Detail page URLs will usually look like this:
http://localhost:8082/project-details/a257b8d463f547dfb9a4b876ee72b544
http://localhost:8082/project-details/my-project
Both of the above URLs are valid detail URLs for a page called project-details
. Structr uses the name
and the id
property of an object for detail object resolution by default. If the requested object was found, Structr will make it available under the current keyword.
Extending the default behaviour
The default behaviour can be overridden with the HtmlServlet.resolveProperties
setting in the structr.conf. Structr expects a comma-separated list of <Type.name> pairs like in the following example.
HtmlServlet.resolveProperties = AbstractNode.id, AbstractNode.name, MyEntity.originId
To keep the default behaviour and simply extend the resolution with an additional key, use the above line as an example.