has_ancestor
Synopsis
@has_ancestor(Expression) -> Boolean
Description
Checks if the object has an ancestor matching the provided logical expression.
expression. This function is similar to @has_parent()
, but extends the operation to grandparents and further.
info
Available in Contextal Platform 1.0 and later.
Parameters
A logical expression, which should match for the ancestor object.
Return value
Boolean: true
if the ancestor object satisfies the logical expression, false
otherwise.
Examples
object_type = "Image" && @has_ancestor(object_type == "URL")