Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would love to see some rules conditions like:
- Is referenced by entity (req. arg1: entity_type, opt. arg2: entity_bundle, opt. arg3: entity_id, provides referencing entity objects)
- Is referencing entity (req. arg1: entity_type, opt. arg2: entity_bundle, opt. arg3: entity_id, provides referenced entity objects)
Comments
Comment #1
iMiksuMy use case is to create an page redirect when user goes to view node page which is referenced by other node. The goal is to redirect user into that referencing node page instead current one...
Comment #2
airb CreditAttribution: airb commentedi think you can do the same with entity reference too.
http://dev.nodeone.se/en/learn-page-manager-part-2-introduction-and-more
Comment #3
Chaulky CreditAttribution: Chaulky commentedI think the use case in that video is the opposite of what iMiksu wants to do. In the video, it's redirecting from a node to a node it references. iMiksu wants to go from a node to a node that references it.
Comment #4
iMiksuThat is correct.
Comment #5
airb CreditAttribution: airb commentedyou have to create a view to find the node, and set up your rule different.
maybe rules bonus pack is needed too.
views
create a view (w. context + relationship) to find the nid of the referencing node (possibly not only one) - you can use sorting to create hierarchy of referencing nodes.
rule
conditions:
check number of results returned by VBO
actions:
load a view -> get nid of first element
redirect to node
Comment #5.0
airb CreditAttribution: airb commentedImproved formatting.