下面的 PHP 调用工作正常,但也许还有另一种更简洁的方式来显示相同的内容?
<?php if ($this['modules']->count('top-a')) : ?>
<?php if ($this['config']->get('warp_onlyhome')) : ?>
<?php $catid = JRequest::getInt('catid'); if ($catid == 0) : ?>
<section id="top-a" class="grid-block"><?php echo $this['modules']->render('top-a', array('layout'=>$this['config']->get('top-a'))); ?></section>
<?php endif ?>
<?php else: ?>
<section id="top-a" class="grid-block"><?php echo $this['modules']->render('top-a', array('layout'=>$this['config']->get('top-a'))); ?></section>
<?php endif; ?>
<?php endif; ?>