你在这里

Drupal 7 views php模块不显示分页处理

主标签

修改/views_php/plugins/views/views_php_plugin_pager.inc文件,去除红色部分,加上绿色部分即可

 

class views_php_plugin_pager extends views_php_plugin_wrapper  {

   /**

    * Perform any needed actions just prior to the query executing.

    */

-  public function pre_execute($query) {

+  public function pre_execute(&$query) {

     $this->wrapped->pre_execute($query);

 

     foreach (array(/*'argument',*/ 'field', 'filter', 'sort', /*'relationship'*/) as $type) {

@@ -23,6 +23,7 @@ class views_php_plugin_pager extends views_php_plugin_wrapper  {

 

     $this->wrapped->view->query->set_limit(0);

     $this->wrapped->view->query->set_offset(0);

+    $query->range(0,666666);

   }

 

   /**

 

论坛: 
Drupal 版本: 

猜你喜欢