I'm developing a module, and there is a table that needs views integration. The table is not so special, but can't find a solution yet.

This is how my table looks: nid_a|nid_b|data

I would like to join this table to the node base table, with nid_a as joining key, and nid_b should come from a contextual filter (aka argument).

How can I achieve this?

System: Drupal 7.x and Views 3.x

  • What version of drupal? – 4life May 29 '13 at 13:05
  • 1
    Have you read the documentation here? It should tell you what you need. If not, feel free to come back with more specific questions. – Alfred Armstrong May 29 '13 at 13:09
  • Yes, I'm using hook_views_data() to describe my table. The problem is, on $data['my_table']['join'] array it should consider a contextual filter as a second joining condition – EdgarPE May 30 '13 at 6:54

Create a custom module and use the hook_views_Data. Here is a link for doing that

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.