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.

get_or_null()

Usage

get_or_null(entity, propertyKey)

Description
Returns the value for the given property key from the given entity, but doesn’t print an error message when the given entity is not accessible. See get() for the equivalent method that prints an error if the first argument is null.

Example

${get_or_null(page, 'name')}

results in

my-page-name

Search results for "get_or_null()"

get_or_null()

Returns the value for the given property key from the given entity, but doesn’t print an error message when the given entity is not accessible. See get() for the equivalent method that prints an error if the first argument is null.

get_or_null(entity, propertyKey)