New in 1.39.0

urlForDataItem(dataItem, options)

Determines the URL of a data item's details page.

The urlForDataItem function can be used with DataItem instances.

For an application running under Node.js, not in the browser, the origin of the generated URL can be configured using Scrivito.configure. For instance, if the origin is set to https://mycompany.com, the URL resulting from the above call would be https://mycompany.com/order-details?order_id=EEDF141E81694518”.

Params

  • dataItem (Object) – A DataItem instance.

Returns

String – The URL of the details page of the model instance concerned, or null if no such details page exists.