By Ambreen Darjat on
I have made custom node "project". Inserted the values in the database. Now I want to create a module, which on the user criteria displays project information. For instance if the user wants to view the project from a certain customer, he sees a tabular result. I can’t generate views. I was reading the book and I got the hang of templates. But somehow nothing is displayed. I don’t understand how to display attributes of a table. The query at hook_load works fine, fetches the data. Either the hook_view has issues or I am not implementing it right. Can somebody guide me please ?
Comments
.
If I understand correctly, you want to create a node type (different than the default "page" and "story") and create a view from it. What I don't understand, is why you'd be doing all that in code. Can't you just use CCK and Views UI for this?
Yeah I can. Since it is a
Yeah I can. Since it is a university project related to programming styles..I have to learn the coding methods.
I have got the hang of
I have got the hang of creating nodes..now just need a proper tabular display (as those of reports)
.
What you're trying to do is very, very, very easy in Drupal... if you use the UI. Coding it's a whole lot trickier, and you're making things unnecessarily difficult that way.
That said, if you need to do it programmatically, and if you don't NEED to use the Views API, I'd go for a combination of the following:
A couple of remarks on this: