Posted by Ayesh on January 14, 2012 at 8:55pm
2 followers
Jump to:
| Project: | Insert View |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I build a small module taking this module's filter stuff as mother module to return the number of results of the View instead of embedding the View.
Not sure if this would be a useful feature or not, but I'd like to see if you are open to extend this module or make it as a new module.
Filter process internal function is taken from this module, but it executes the result in a different way (sets pager to 0to get all results). Plus, my this tiny module supports "current-view" as a valid View's machine name so we can get View's total number of results in View's footer or header without executing the View.
Related: #347719: How many nodes from a view?
Thanks!
Comments
#1
do I understand you correctly, you put something like [viewcount:current-view] into the views header, and it returns the count?
#2
Yes.
Similar to [view:my_view] , but [viewcount:my_view] returns results count of the View.
Also it processes "current-view" to get current view's results (without views_get_view() - using views_get_current_view )
Thanks.