By brainfood on
I have created a table called items. The items table has about 2000 rows in it and I want to create a view that pulls info from this table. I went to set up a view to do this but only see the default views and don't know how to access the newly created items table when creating the view. Any help will be appreciated!
Comments
_
You'll need to check the views documentation for how to expose table data to views-- i can't remember if it's part of the advanced help or not though.
I found this under advanced
I found this under advanced help:
Help › Views › Views' API
Describing tables to Views
Tables are described to Views via hook_views_data(), which returns an array of table information, keyed by the name of the table. For example, if your module is describing three tables, 'foo', 'bar' and 'baz', your array......
Does this look like the right section? Where do I find the hook_views_data()?
I searched and found this link: http://drupal.org/node/235062
Do I need to create or modify a module in order to use the Views API? Is the Views API already installed? Or is this something that I need to install? If I do need to install it where do I find it. How do I tell if it is installed?
As you can tell I am a newbie to Drupal. I started using it this weekend and really like it.
_
Based on the link you provide above, it looks like you'll have to create a module. The hook_views_data function is described off the 'Views 2 API hooks' link at toward the bottom of that page.
Thanks WorldFallz. Does
Thanks WorldFallz. Does anyone have experience creating a module and then using the Views 2 API? Do I have to download the Views 2 API?
_
It's part of views-- just install views.