You are viewing an older version of the Hyper documentation (1.x).
View the latest version (2.x) →
Template Guides
Available Variables
The following methods are available to call in your Twig templates:
craft.hyper.getRelatedElements(params)
Returns an ElementQuery for elements that are related to a provided Hyper field.
{% set relatedElements = craft.hyper.getRelatedElements({
relatedTo: {
targetElement: entry,
field: 'myHyperField',
},
ownerSite: 'siteHandle',
elementType: 'craft\\elements\\Entry',
criteria: {
id: 'not 123',
section: 'someSection',
}
}).all() %}
Last updated: May 2, 2026, 3:18:52 PM