~略~ /** * to render the content * replace the contents which were already output * @param $format Format specified in the renderer * @param $renderer reference renderer * @param $data value returned by handler * *

title

*

title

* Even the same title at the same level, it is unique */ public function render($format, &$renderer, $data) { if ($format == 'xhtml' && $data) { $rows = explode("\n", $renderer->doc); $target = $rows[count($rows) - 5]; //preg_match('|^()(.+?)()$|', $target, $matches); preg_match('|^()(.+?)()$|', $target, $matches); $renderer->doc = strtr($renderer->doc, array($target => $matches[1].$data.$matches[2].$matches[3].$matches[4])); return true; } return false; } ~略~