ヘッダ (Previous) (Next) 出力

View this page in Last updated: Sun, 05 Oct 2008
English | French | German | Hungarian | Japanese | Polish | Spanish | Plain HTML

本文

本文 -- 中身の追加

説明

ページの作成とヘッダの設定を済ませたら、次は実際の中身をページに追加しましょう。 そのために使用するメソッドが addBodyContent() です。

デフォルトでは、このメソッドは既存の内容の後に追記します。 もし既存の内容を上書きしてしまいたい場合は、 setBody() を使用します。 unsetBody() を使用すると、新しい内容を追加せずに既存の内容をすべて空にします。 prependBodyContent() を使用して、既存の内容の先頭に何かを追加することもできます。

次の定数 HTML_PAGE2_APPENDHTML_PAGE2_PREPEND および HTML_PAGE2_REPLACE を、フラグ属性として指定することができます。 これらの使い方は、その名前のとおりです。


<?php
$page->addBodyContent('<h1>こんにちは!</h1>');
$page->addBodyContent('<p>これは段落です。</p>');
?>

ヘッダ (Previous) (Next) 出力

Download Documentation Last updated: Sun, 05 Oct 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.