I'm添加在文章的Joomla額外的字段,我想不能表明新領域(與「李」)是否存在空:不顯示,如果空在PHP
從這個
<ul>
<li>
<?php echo $this->item->direccion; ?>
<a href="<?php echo $this->item->urlMap; ?>" target="<?php echo $this->item->targetMap; ?>">Mapa</a>
</li>
</ul>
爲了這樣的事情:
<ul>
<li "if MOLA is empty not show this li">
<?php echo $this->item->MOLA; ?>
<a href="<?php echo $this->item->urlMap; ?>" target="<?php echo $this->item->targetMap; ?>">Map</a>
</li>
</ul>
'<?php if(...):?> ... <?php endif; ?> – deceze