get(entity, propertyKey)

Returns the value for the given property key from the given entity. This method will print an error message if the first parameter is null / not accessible. See get_or_null() for a more tolerant get method.

Please note that the result value of the get() method can differ from the result value of property access using the dot notation (get(this, 'name') vs for certain property types (e.g. date properties), because get() converts the property value to its output representation. That means that a Date object will be formatted into a string when fetched via get(this, 'date'), whereas will return an actual date object.


${get(page, 'name')}

results in

About this article
Last change 2019-08-15
Topics FrontendFunctionsStructr 2.0