I'm editing the core default.php front page file, in hope of putting a div around each introduction article (I want to style the leading and intro articles differently). The leading article has a div surrounding by default, but I'm still getting my head around PHP and would like to know where a div should be put to work for the subsequent intro articles.
In default.php, I'm thinking it needs to go in here somewhere (lines 33-70):
Code: Select all
<?php
$divider = '';
if ($this->params->def('multi_column_order',1)) : // order across as before
for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
if ($z > 0) : $divider = " column_separator"; endif; ?>
<?php
$rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
$cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
?>
<td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
<?php
$loop = (($z < $cols)?1:0) + $rows;
for ($y = 0; $y < $loop; $y ++) :
$target = $i + ($y * $this->params->get('num_columns')) + $z;
if ($target < $this->total && $target < ($numIntroArticles)) :
$this->item =& $this->getItem($target, $this->params);
echo $this->loadTemplate('item');
endif;
endfor;
?></td>
<?php endfor;
$i = $i + $this->params->get('num_intro_articles') ;
else : // otherwise, order down columns, like old category blog
for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
if ($z > 0) : $divider = " column_separator"; endif; ?>
<td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
<?php 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; ?>
</td>
<?php endfor;
endif;?>
Cheers.