- Issue created by @dcine
- Status changed to Needs review
7 months ago 10:02am 14 April 2024 - πΈπ°Slovakia coaston
Hello,
For this I am using views.
1.Create entity reference field in Comments content type with reference to Films like you already did and it is called "target_id"
2.Add EPP like you did to entity reference field > target_id: "[current-page:query:target_id]"
Note: You can use anything you want so even target_id: "[current-page:query:aaa]" would work and you can use later aaa instead in link.
3.Create a view with Comments content type
4.Create relationship with tareget_id field
5.To Contextual filters add ID with relationship
6.You can use custom text field or in Header section you can add Global:Text are and put your link there but replace "/node/add/comment1?target_id=2" but "Use replacement tokens from the first row" has to be enabled.
Replace with :
"/node/add/comment1?target_id={{ raw_arguments.nid }} "
7.The same for other fields like customer you can add field to views and update link with anything like :
"/node/add/comment1?target_id={{ raw_arguments.nid }}&customer={{ field_customer_select }}"
where of course EPP has to be added to field_customer_select first like field_customer_select: "[current-page:query:customer]"
8.If you are using field groups module, you can also add destination anchored to exact field group.