custar
unread,Sep 15, 2009, 9:39:05 PM9/15/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to CakePHP-ja
$html->div() はその第2引数に content を指定する。
function div($class = null, $text = null, $attributes = array(),
$escape = false)
しかし、定義通り第2引数を null としてしまうと、
div() から呼ばれる tag() 内部において
if ($text === null)
{
$tag = 'tagstart';
}
と解釈されてしまい、tagstart のフォーマットは '<%s%s>' なので、閉じタグが出力されない。
tagend というのもあるが、自動的に補完してくれる様子はない。
if ($text === null)
{
$tag = 'tagstart';
$tagend = $this->output(sprintf($this->tags['tagend'], $name));
}
と変更して、出力時に繋げてあげればいいが、core を弄っているので、
簡単に済ますには、
第2引数に null 以外を指定すればよい。