Twig Components / Methods / related_by_type
Note: You are currently reading the documentation for Bolt 5.0. Looking for the documentation for Bolt 5.2 instead?
related_by_type(direction = "both", limit = null, publishedOnly = true)
is a Twig filter to return a two-dimensional
array of related records, where the first key is the contenttype.
[
'entries' => [ related_entry_1, related_entry_2, ... ],
'pages' => [ related_page_1, related_page_2, ... ]
]
Parameter | Description |
---|---|
direction | Limit relations to a direction. Default is "both"; see Relations and directions for more info. |
limit | Limits the number of related records that are returned. |
publishedOnly | Return only related records that are published. Default is true |
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.