I'm writing a twig template for a paragraph. I'd like to access a text field value from the page/node where this type of paragraph will be added.
Specifically, I'd like to access the value of a text field titled 'field_runner_id'. I access this value in my page/node twig template like this:
content.field_runner_id|field_value
I've tried a handful of techniques (listed below) to access that field value within my paragraph template but am having no success.
How can I refer to a parent page's field value within a paragraph template?
I've found a few posts and articles that address this issue, and am able to get details about the parent node, such as the title and nid but not fields that it contains.
Eg this post: https://mark.ie/blog/printing-values-of-a-parent-node-from-a-drupal-paragraphs-field ...helped me to get the parent page and nid via adding this within my paragraph template:
{% set parent = paragraph._referringItem.parent.parent.entity %}
{{ parent.title.value }}
{{ parent.nid.value }}
I've also tried these, among others, with no success:
{{ parent.content.field_runner_id.value }}
{{ parent.content.field_runner_id[0] }}
{{ parent.content.field_runner_id|field_value }}