Filtering list of nodes with attached views by taxonomy of node I have a single article (page) which has an attached view thats displays a load of nodes (in a content called 'courses').

These nodes have a term reference field called 'language' which assigns them to a specific language the course is taught in.

Each of these nodes have an attached view which lists a load of related nodes (in this case 'products'), and these are also assigned with the same taxonomy called 'language'.

What i am attempting to do is to list these nodes, with the attached view filtered by the same taxonomy 'language'.

I've attempted to set up the view using contextual filters with the notion of getting the parent nodes id (When filter is not available use taxonomy term id from URL) but this only gets me the id of the top level node. What i'm looking to get is to pass the language tid from each course to its attached view.

I've used hook_views_query_alter to add on the join table for the languages table which i'd like to then fill with the tid from the passed taxonomy term to do the filtering.

Anyone done such a thing? seems pretty straightforward as it feels like i'm doing something in the wrong order (ie its rendering the view before attaching to the node).
I would pursue the hook_views_query_alter() way, and using arg(1) and node_load() to load the node you are viewing and get the 'language' value from the node field. Add that value as a filter for your view programmatically.

Is this enough for you to continue on your own?