I have a view which lists nodes referred to by another node, i.e. my view at list/123 shows the nodes referenced by a field on node 123. I'm trying to write an action (actually a rule set) that can remove the selected nodes from the list of references; I can get the nids of the nodes through as a parameter to the action but how can I also get the nid of the parent node? Is there a way to pass that through as a second parameter to the action?
Comments
Comment #1
bojanz commentedWhen your action runs, it's still at list/123, so you can fetch the parent nid from there (the url).
Either that, or node_load($nid), then take what you need from the $node object.
EDIT: Actually, you already get the node object. No need to load it.
Comment #3
wickwood commentedComment #4
wickwood commentedBojanz, or anyone else, how exactly do you fetch a parameter from the view URL and pass it along as a parameter to the Bulk Operation?
Any help would be great appreciated! Thanks in advance!
Steve
Comment #5
wickwood commentedI don't know how it was done here, but I was able to solve my problem with a patch to VBO. You can find it and how I did it at the VBO Issue: Let view arguments be passed as parameters to rule set
Comment #6
wickwood commented