gpt4 book ai didi

cakephp - 带有 li 标签的链接换行

转载 作者:行者123 更新时间:2023-12-04 04:49:45 24 4
gpt4 key购买 nike

是否可以使用 li 标签创建链接换行?
我正在使用 cakephp2

$this->Html->link(
__('title'),array('controller' => 'controller', 'action' => 'index', 'admin' => false)
, array('class' => "", 'id' => "")
);

最佳答案

<li>
<?php
echo $this->Html->link(
__('title'),
array(
'controller' => 'controller',
'action' => 'index',
'admin' => false
),
array('class' => "", 'id' => "")
);
?>
</li>

不要让事情变得比他们需要的更困惑。

或者,如果您真的必须使用 Cake,请使用 HtmlHelper::tag ,
$this->Html->tag('li', $this->Html->link(..)); // <li><a href="..">..</a></li>

关于cakephp - 带有 li 标签的链接换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17613791/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com