开发者

How to add custom View Type in Drupal

I'm learning a lot about the Views in Drupal, but can't figure how to a开发者_StackOverflowdd 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!!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜