I need to alter a Views relationship contextually: since the View is embedded into another node, the relationship is defined by a field's value of a parent node.
I presume the only way to add a relationship is using hook_views_data_alter, but I'm not quite sure if it's going to work inside a preprocessor function (I'm creating a View for a certain node type) and what's the proper way of using it. The related field will be a Nodequeue instance (Nodequeue module is integrated with Views using relationships), its name will be contained in that parent node's field.
Thanks in advance!