How can I display a view's count in a navigation item?
I have a view the displays a list of stories (a content type) and I have an item in a menu that links to that view. I need to display the number of items returned by that view next to the menu item that links to it on all pages of the site.
The solutions I've thought of so far have been:
Add a block to the view and have that blocked displayed in a hidden area on all pages and then use the
num_rowsproperty of the view's object. The disadvantage of this is that this view then runs on every page possibly causing performance issues.
Add a block (or some other type) to the view that calculates the count and have that displayed by the menu item some how. But I haven't been able to figure out how to do this. I tried using the "Use aggregation" setting but I get a "broken/missing handler" error when using an "Aggregation type" other than "Group results together" in Sort or Filter criteria.
Any help with this would be much appreciated.
This is running on Drupal 7.7.