Drupal return number of results in a View

前端 未结 6 1155
执念已碎
执念已碎 2021-02-07 19:47

I have a view in Drupal that filters my content. It brings back 7 rows. All I want to return is the number or results returned(7). Is this possible?

I tried using the Vi

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 20:11

    what you can do is to activate php for the views header/footer and add the following snippet to it:

    total_rows; 
    ?>
    

    This will print the total number of rows.

    If you need the result as a field, you could use the "Views custom field" module, add a php field and run the same snippet.

    Regards

    Mike

提交回复
热议问题