views:

189

answers:

3

I'm using the decisions module for drupal and it currently has no views integration. I'm looking for a way to use some simple filters based on this module in views. How do you integrated a module with views? All of the available documentation is extremely vague.

+1  A: 

Look at some example files. Comment module is a good example - views/modules/comment.

dmitrig01
comment module is excelent reference!
henrijs
A: 

You have 3 ways to learn about views:

  • The doxygen API manual has all the views documentation. There are some good examples etc there. I have used it myself a few times, but it can be hard to find what you want, as it is usually not as detailed as one could wish it to be.
  • The views code itself. Views implement a lot of the stuff in the same way as other modules could do.
  • Look at other modules and how they have implemented what you want to do.

Views is a complex piece of machinery and there is no easy way to learn how to use it. But with after some trial and error I'm sure you'll be able to get there.

googletorp
A: 

Adding a table and it's fields as sort, filter, arguments to drupal is surprisingly easy if you implement standard handlers.

Taking a quick pick at the code for the decisions module, the tables have nid which can be link to to views using a relationship to the node table.

Here is a good walk thru: http://views-help.doc.logrus.com/help/views/api-tables

indytechcook
also this: http://views.doc.logrus.com/group__views__hooks.html#g227057901681e4a33e33c199c7a8c989.
indytechcook

related questions