Needs work
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2019 at 12:53 UTC
Updated:
25 Aug 2026 at 14:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Syntapse commentedMost other features of drupal have contextual arguments or ability to access parent context (views, panels, blocks). This post is almost a year old and this would still be a great feature and create countless more applications for paragraphs. Does anyone have an opinion on this or have any workarounds on how to achieve this?
Comment #3
jasonluttrell+1 for this feature.
Comment #4
capellicI am trying to use the Entity Extra Fields module to add a pseudo field to a paragraph that will show a field value from its host node via tokens. I saw a rumor out there that that something like `[paragraph:parent_entity:field_event_location]` would work but it doesn't.
Comment #7
d70rr3s commentedComment #8
rromore commentedTested MR !28 and it works.
Comment #9
Syntapse commentedComment #10
Syntapse commentedComment #11
Syntapse commentedTested in dev version.
This is works for basic entity-ref'd paragraphs and paragraph library entities!
e.g.
parent node.body = "hello world"
(entity-ref) simple paragraph.text = [node.body] => "hello world"
(linked library) simple paragraph.text => [node.body] => "hello world"
context just works in both cases
@d70rr3s thanks!
Comment #12
d70rr3s commentedThanks, but the credit goes to Clive at Drupal Answers, I just made a MR with it.
Comment #13
jrockowitz commentedComment #16
fathershawnRebased the branch in the issue fork on recent changes in `8.x-1.x` and pushed to a new branch to preserve other's prior work. Opened a new MR with the rebased code.
I've also added a patch file for those who prefer it.
Comment #17
fathershawnComment #18
dieterholvoet commentedMaybe
parentcould be a better token name thanparent_entity? Simpler, + the same as taxonomy's parent token.Comment #19
berdirI'm very confused why this is mixing templates and tokens. templates usually implies twig templates, and twig templates don't resolve tokens. Neither seems "default installed setup" relevant, tokens either exist or they don't, it's not a default setup/configuration thing.
Comment #21
dieterholvoet commentedComment #22
alphex commentedThis patch breaks against paragraphs 1.22.
Comment #23
alphex commentedThis patch breaks against 1.23 now, also.