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

merlinofchaos’s picture

Status: Active » Closed (won't fix)

This 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.