Joomla 1.5-博客循环
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Joomla 1.5-博客循环相关的知识,希望对你有一定的参考价值。
<?php $divider = ''; if ($this->params->def('multi_column_order', 0)) : // order across, like front page 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" 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', 4) ; else : // otherwise, order down, same as before (default behaviour) 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', 4) / $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; ?>
以上是关于Joomla 1.5-博客循环的主要内容,如果未能解决你的问题,请参考以下文章
Joomla 1.5 | Joomla 1.5教程的Suckrfish下拉菜单
在 Joomla 1.5 之外包含 Joomla 组件(Joomla FB Chat)