joomla/joomla-cms — pull request #3705 by yireo (2014-06-02 09:40:01+00:00)
Title: Hide popular articles module if list is empty

If the mod_articles_popular helper returns no articles at all (because a certain category was set in the parameters, or something alike), the HTML-tag

of the module is still shown but there are of course no items in them. By adding an if-empty check, the

structure only shows if there are actually articles to display. Even better: Because of this, the entire module instance is hidden if there are no articles.

To test:
1) Create a Most Popular Articles module instance assigned to some position in your template.
2) Make sure the module instance is set to display its module title.
3) Configure the module instance to show articles from a category that has NO articles.
3) Without the patch, the module title still shows. With the patch, the module title does not show, and the entire module is gone - because there are no articles to display anyway.