cakephp - CakePHP HTML Helper を使用して複数の要素を出力する
質問する
993 次
2 に答える
1
Just use the URL method of the HTML helper instead of the link one,do the rest as static HTML, may as well keep the amount of PHP down to a minimum as far as I see it.
<a href="<?php echo $this->Html->url($params); ?>">
<h3>test</h3>
<?php echo $this->Html->image($params); ?>
<p>Some text</p>
</a>
This would be the most efficient way of doing this task. But maybe you should think about your markup structure and what you want to achieve...
于 2012-04-26T10:37:12.670 に答える