You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

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.

Search results for "URI Object Resolution on Detail Pages"

We could not find anything matching "URI Object Resolution on Detail Pages" in our documentation. Please rephrase your search.

You can also ask your questions in the Structr Google Group or create a free account in the Structr Support Portal.
Click here to send feedback to the Structr team.