6
echo $this->Html->link(
'more',
array(
'controller'=>'posts',
'action'=>'view',
$post['Post']['id']
)
);
このアンカー/リンクにIDとクラスを割り当てるにはどうすればよいですか?私はそのCSSルールをオーバーライドしたい。
echo $this->Html->link(
'more',
array(
'controller'=>'posts',
'action'=>'view',
$post['Post']['id']
)
);
このアンカー/リンクにIDとクラスを割り当てるにはどうすればよいですか?私はそのCSSルールをオーバーライドしたい。
HTML属性は、3番目のパラメータとして配列に指定できます。
echo $this->Html->link(
'more',
array(
'controller'=>'posts',
'action'=>'view',
$post['Post']['id']
),
array(
'id' => 'myId',
'class' => 'myClass'
)
);
2.xバージョンやCakePHPの1.3のためのCookbook 1.3ためCookbook 2.xで詳細情報。
ありがとうございました。 –