I have a custom template that renderes a module in some position. The module does a query to database and renders according to the results. However, if the query to database returns empty rows, module does not have to be shown.
I have this in the template:
<!-- lo más de la semana -->
<?php if ($this->countModules('lo-mas') > 0): ?>
<div class="row">
<div class="lomas"> <h3>LO MÁS DE LA SEMANA</h3></div>
<jdoc:include type="modules" name="lo-mas" />
</div>
<?php endif; ?>
<!-- fin lo más de la semana -->
I can have several modules at "lo-mas" position, but if, for some reason, all of the modules does not render any output, I don't want the title to be shown ("LO MÁS DE LA SEMANA")
Is this possible in Joomla 3?