link or other HTML help开发者_开发百科er functions?" />
开发者

cakephp clean html output

How to add "\n" always after when i use $html->link or other HTML help开发者_开发百科er functions? I add in AppHelper but doesn't work. I usen CakePHP 1.3


The Html helper doesn't allow you to append text to element output. Your best bet is to use separate echo statements instead of using a code block. For example, instead of

<?php
echo $this->Html->link('Link 1', '/foo');
echo $this->Html->link('Link 2', '/bar');
?>

use

<?php echo $this->Html->link('Link 1', '/foo'); ?>
<?php echo $this->Html->link('Link 2', '/bar'); ?>

See http://book.cakephp.org/view/1435/Inserting-Well-Formatted-elements for Html helper documentation and examples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜