Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2008 at 15:12 UTC
Updated:
30 Jan 2008 at 18:18 UTC
Hi,
I got a question:
I have a couple of views that are connected through a tabbed navigation (show menu as tab). However, if one of the views is empty, I need the tab to be removed from the menu. So basically the view only appears in the menu if there's content for it.
Is that possible at all? And if so, how?
Puzzled
Markus
Comments
Comment #1
merlinofchaos commentedThis is not possible; the menu code doesn't run the view prior to adding the tab.
The only way to do this would be to disable Views' menu code and implement your own menu code to add the tab; that way you can run the view, check for results, and display the tab if it's there. Note that this is quite inefficient since you're going to run that view on any page where that tab might be applicable, and that could be expensive.