Hello,
I am trying to make a piece of code used in Joomla to print out content in either one or two columns - depending on which I set in the back-end admin section of Joomla.
Two columns displays ok, it has the PrimaryColumn as a wrapper, and then the LeftColumn and the RightColumn.
The problem is with displaying ONE column - I only want the PrimaryColumn displayed, but my code outputs the LeftColumn as well.
Can anyone help? 🙂
<div id="PrimaryColumn">
<?
if ($this->params->def('multi_column_order',1)):
$i = $i + $this->params->get('num_intro_articles');
else:
for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
$column_class = ($z > 0) ? 'RightColumn' : 'LeftColumn';
echo '<div class="'.$column_class.'">';
for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
if ($i < $this->total && $i < ($numIntroArticles)) :
$this->item =& $this->getItem($i, $this->params);
echo $this->loadTemplate('item');
$i ++;
endif;
endfor;
echo '</div>';
endfor;
endif;
?>
</div>