1
votes

I'm learning a lot about the Views in Drupal, but can't figure how to add new View types to the list (node, comment, user, etc).

The Query I'm trying to recreate in a View is something like "SELECT * from Quizz", which is a custom table, and I have already created a new content type named "Quizz" but I would like to be able to use it in the View module.

Thanks for your help!!

2
I have hopefully provided a helpful answer below, however it is worth noting that Views is not always the answer. Sometimes it is simpler to write the queries yourself. Views is only really needed if you need a lot of flexibility or integration with some views output modules. - Jeremy French

2 Answers

3
votes

You'll need to use hook_views_data. Full documentation is in the help for the Views module, but here's a bit of example code.

1
votes

Take a look at the data module, or the older table wizard as a way to get views from generic tables. Both provide a UI. However I don't know how they will cope with complext relationships between tables.