views

模块推荐:Views Embed Form

This module allows module developers to embed (attach) any form in a Views row display as a field.

It creates a simple hook API function to whitelist embeddable forms. Attached a simple form as an example.

在模板或模块嵌入Views2的示范代码

最新views 3.x(drupal 7)的变动

例子: 不显示pager,仅显示6条记录,如下:

        $view->display_handler->set_option('pager', array('type'=>'some','options' => array('items_per_page' => 6)));

========================================================================