I am trying to make a joomla template. I am also using bootstrap v2.3.2. I want to make a design 3/12-6/12-3/12 distribution. I am checking if any modules are positioned on the left and right columns
$span = 12;
if ($this->countModules('right')) $span -= 3;
if ($this->countModules('left')) $span -= 3;
<?php if ($this->countModules('left')): ?>
<div id="sidebarleft" class="span3">
<jdoc:include type="modules" name="left" style="well" />
</div>
<?php endif; ?>
<div id="content" class="<?php echo $span; ?>">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<?php if ($this->countModules('right')) : ?>
<div id="sidebarright" class="span3">
<jdoc:include type="modules" name="right" style="none" />
</div>
<?php endif; ?>
I have assigned a mod_articles_category
module to left position but it is empty. So the module is not shown. But joomla thinks that there is a module in that position and it has to shrink content with.
How can I use the space if module is not shown on a page?