I am looking for details on the api to define my own view data, such as what values I can provide for the table I am defining, what values are available for the fields etc.

I have found a tutorial that gives me the basic info, but now I need more specific info.

I have found this page


but when I click on the link to


I go to a page with virtually no information with one link which takes me back to the listing page I started at.

Is there somewhere I can find out information about what hook_views_data should define?

closed as off-topic by Mołot, niksmac, Triskelion, Free Radical, monymirza Jun 28 '13 at 3:39

  • This question does not appear to be about Drupal within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Views's documentation is incomplete, hard to read, sometimes outdated and buggy too. But we are not the ones who can help it. If you have a specific problem with specific thing you need to implement, ask us! Or ask Views team to fix their docs. – Mołot Jun 27 '13 at 11:55

Views does have complete documentation for that hook, but it's not in the most obvious place.

If you install the Advanced Help module and go to http://mysite.com/help/views/api-tables you'll find the Describing tables to Views help page which contains extensive documentation and code samples.

You can also find the full Views' API docs at http://mysite.com/help/views/api with that module installed.

On top of that, the list of functions that implement hook_views_data() would also be worth a look. The aggregator, book and node module implementations look to be well commented at first glance.

  • Thank you, I was begining to think it was just me. Does anyone on the web make Advanced help available to the web in general via google, would be much more useful? – Toby Allen Jun 27 '13 at 12:12
  • Advanced help content is just content supplied witha module (i.e. in Views it's in the /help directory). If you want to add to the docs, just open an issue and provide a patch to the HTML files. – Chapabu Jun 27 '13 at 12:22
  • @Clive I never expected to say this to you: Please use example.com and example.org in examples, not a commercial domain, especially not one that does not provide links you have used. – Mołot Jun 27 '13 at 12:46

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