I want to enlarge an existing website with a new "News" menu (Blog - Content Category). However, there will be times when there are no content items to display, because none are currently published. Instead of getting a "There are no Items to display" message, I want the menu item itself to disappear. When a content item is published, I want the menu item to re-appear. I'll happily split the navigation into two separate modules: one "news" module that can be unloaded, and another menu module including all the other menu items that is always visible.
Unfortunaely, I do know nothing about PHP. But I assume that it must be possible to
a) determine the number of currently active content items within a given content category and
b) hide (i.e. "not load") the news module when the number of acive items is zero.
The idea came to me when I saw this in the Solarflare II template:
Code: Select all
if ( mosCountModules( 'top' ) ) { mosLoadModules ( 'top', -2 ); }
Thank you from
cooperate!