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.
Hi,
I have a block with a VBO listing garages.
When viewing nodes of type cars, the block is displayed.
I want to link with entity references, the garages and the cars.
I managed to create a rule triggered by the VBO that does exactly that but with 1 major issue: the nid of the car must be typed in by the user as a parameter of the rule component.
My question is then: how can I retreive this node without asking the user to enter the nid?
Thanks for the help.
Comments
Comment #2
Balbo CreditAttribution: Balbo commentedHow to do that? Any hint?
Comment #3
Chipie CreditAttribution: Chipie commentedHave you found a solution?
Comment #4
CmKeen CreditAttribution: CmKeen commentedNo, not really.
I found a way using PHP but not directly with rules.
Comment #5
Chipie CreditAttribution: Chipie commentedHow did you do it?
Comment #6
CmKeen CreditAttribution: CmKeen commented6 month later and I don't remember how I did it in the first place.
I should certainly have documented here.
Anyone knows how to do it?
Comment #7
CmKeen CreditAttribution: CmKeen commentedHere is the use case.
I have 2 content types called list and restaurant
A list has an multiple entity reference field referencing restaurants
On the list node, I display a views block which is a VBO listing all the restaurants of the list.
When I select some restaurants, I want the VBO to trigger a rule which will remove the selected restaurants from the list.
My issue is that I don't manage to pass the list I'm currently viewing to the rules component.
I tried a bit with php evaluation by looking at the path and returning arg(1) but the path is the one from the batch and not the node/XXX path.
I'm stuck. Any idea is welcome
Comment #8
Slacker CreditAttribution: Slacker commentedI have very similar problem, any solution?