<h1>
	テンプレート基本関数リファレンス</h1>
<div class="Section">
	<p>
		ここではBaserCMSが提供するテンプレートで利用できる基本的な関数（命令）をご紹介します。<br />
		BaserCMSはプログラム言語であるPHPで作られていいますので、関数は必ず&lt;?php ?&gt;で囲みます。<br />
		また、リファレンスに説明されている関数の中で [ ] で囲まれている引数は省略可能を指します。</p>
	<pre>
（例）&lt;?php $baser-&gt;title() ?&gt;</pre>
	<ul class="Notice">
		<li>
			ここに記載されている関数（命令）は、必ずしも利用しなければならないというわけではありません。特に、$baser-&gt;img や、 $baser-&gt;link などは、設置ディレクトリの変更に耐える事が目的ですので、設置ディレクトリを変更しない事が前提であれば、IMGタグやAタグ等、通常のHTMLタグでも問題ありません。</li>
		<li>
			BaserCMSが提供する基本的な関数（命令）は、BaserHelperというクラス（クラスをご存知でない方は命令の集合体と思ってください）にまとめられています。</li>
		<li>
			BaserCMSで利用できる関数は、ここに記載されているものだけではなく、もちろん、そのベースとなっているCakePHPの関数・クラスも全て利用できます。</li>
	</ul>
</div>
<div id="reference">
	<div class="Section" id="section1">
		<h2>
			<span>BaserHelper</span></h2>
		<p>
			BaserCMSでは、WEBプログラムのテンプレートをできるだけ簡単に利用できるようにする為、 テンプレートで利用する為の基本的な命令をBaserHelperにまとめています。<br />
			各命令は、出力系、取得系、設定系、判定系と４つのグループにわけられています。</p>
		<h3>
			<span>BaserHelper 出力系命令</span></h3>
		<p>
			出力系の命令は、PHPにおける echo や print 等の出力命令を付与せずとも、関数を配置しただけでそのまま出力される命令を指します。</p>
		<h4>
			<span>タイトルタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;title( [$separator] , [$categoryTitleOn] )</strong></p>
		<p>
			この関数は、初期状態でSEO対策を意識したタイトルタグを出力します。</p>
		<pre>
（例）コンテンツ名｜カテゴリ名｜サイト名</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$separator</td>
					<td>
						区切り文字を指定する。</td>
					<td>
						&#39;｜&#39;（縦棒）</td>
				</tr>
				<tr>
					<td>
						$categoryTitleOn</td>
					<td>
						カテゴリタイトルの出力有無。<br />
						もしくは、カテゴリ名として出力したい文字を指定する。</td>
					<td>
						属するカテゴリのタイトル</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>キーワード用のメタタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;metaKeywords()</strong></p>
		<p>
			コンテンツテンプレート側で何も指定がない場合は、管理画面のサイト基本設定で指定されたサイト基本キーワードを出力します。<br />
			個別に指定する場合は、コンテンツテンプレートに下記の１行を記述します。</p>
		<pre>
$baser-&gt;setKeywords(&#39;キーワードテキスト&#39;)</pre>
		<h4>
			<span>ページ説明文用のメタタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;metaDescription()</strong></p>
		<p>
			コンテンツテンプレート側で何も指定がない場合は、管理画面のサイト基本設定で指定されたサイト基本説明文を出力します。<br />
			個別に指定する場合は、コンテンツテンプレートに下記の１行を記述します。</p>
		<pre>
$baser-&gt;setDescription(&#39;説明文テキスト&#39;)</pre>
		<h4>
			<span>アイコンタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;icon()</strong></p>
		<h4>
			<span>XMLヘッダタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;xmlHeader()</strong></p>
		<h4>
			<span>ドキュメントタイプを指定するタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;docType( [$type] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$type</td>
					<td>
						ドキュメントのタイプを指定する</td>
					<td>
						&#39;xhtml-trans&#39;</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>CSSの読み込みタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;css( $path , [$rel] , [$htmlAttributes] , [$inline] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$path</td>
					<td>
						CSSファイルまでのパス。先頭にスラッシュをつけた場合は、/app/webroot/ からのパスとなる。スラッシュをつけず相対パスとした場合は、/app/webroot/css/ からのパスとなる。拡張子は不要。</td>
					<td>
						&minus;</td>
				</tr>
				<tr>
					<td>
						$rel</td>
					<td>
						rel 属性</td>
					<td>
						&#39;stylesheet&#39;</td>
				</tr>
				<tr>
					<td>
						$htmlAttributes</td>
					<td>
						要素の属性</td>
					<td>
						空</td>
				</tr>
				<tr>
					<td>
						$inline</td>
					<td>
						タグを記述した場所に出力するかどうかの真偽値。false時は、$baser-&gt;script()の場所に出力される。</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>javascriptの読み込みタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;js( $url , [$inline] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$url</td>
					<td>
						javascriptファイルまでのパス。先頭にスラッシュをつけた場合は、/app/webroot からのパスとなる。スラッシュをつけず相対パスとした場合は、/app/webroot/js からのパスとなる。拡張子は不要。</td>
					<td>
						&minus;</td>
				</tr>
				<tr>
					<td>
						$inline</td>
					<td>
						タグを記述した場所に出力するかどうかの真偽値。false時は、$baser-&gt;script()の場所に出力される。</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>コンテンツのタイトルを出力する</span></h4>
		<p>
			<strong>$baser-&gt;contentsTitle()</strong></p>
		<p>
			$baser-&gt;title()では、サイト名やカテゴリ名等を含んだタイトルがtitleタグとして出力されますが、$baser-&gt;contentsTitle()では、純粋にコンテンツページのタイトルのみが出力されます。</p>
		<h4>
			<span>画像読み込みタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;img( $path , [$options] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$path</td>
					<td>
						画像ファイルまでのパス。先頭にスラッシュをつけた場合は、/app/webroot/ からのパスとなる。スラッシュをつけず相対パスとした場合は、/app/webroot/img/ からのパスとなる。</td>
					<td>
						&minus;</td>
				</tr>
				<tr>
					<td>
						$options</td>
					<td>
						要素の属性等</td>
					<td>
						空</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>アンカータグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;link( $title , $url , [$htmlAttributes] , [$confirmMessage] , [$escapeTitle] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$title</td>
					<td>
						アンカータグのラベル</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$url</td>
					<td>
						リンク先のパス<br />
						サイト内のページを指定するいは、BaserCMSの設置場所を起点としてスラッシュから始まる絶対パスを指定する。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$htmlAttributes</td>
					<td>
						要素の属性</td>
					<td>
						空</td>
				</tr>
				<tr>
					<td>
						$confirmMessage</td>
					<td>
						移動前の確認メッセージ</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$escapeTitle</td>
					<td>
						$titleをエスケープするかどうかの真偽値</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>相対パスから実際のパスを出力する</span></h4>
		<p>
			<strong>$baser-&gt;url( $url , [$full] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$url</td>
					<td>
						相対パス</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$full</td>
					<td>
						絶対URLを返すかどうかの真偽値</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>コンテンツ内で設定したCSS読み込みタグやjavascript読み込みタグをレイアウトテンプレートに出力する</span></h4>
		<p>
			<strong>$baser-&gt;script()</strong></p>
		<p>
			コンテンツごとに個別のCSSやJavascriptを読み込み、headタグ内に出力したい場合などに利用します。<br />
			この関数を配置した場所に、コンテンツ内で記述した$baser-&gt;css や、$baser-&gt;js 関数で、$inline オプションをfalseにした場合のタグを出力します。</p>
		<pre>
（例）$baser-&gt;css(&#39;original&#39;,null,null,false);</pre>
		<h4>
			<span>エレメント（部品）テンプレートを出力する</span></h4>
		<p>
			<strong>$baser-&gt;element( $name , [$params] , [$loadHelpers] , [$subDir] )</strong></p>
		<p>
			&nbsp;</p>
		<pre>
</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$name</td>
					<td>
						エレメントテンプレート名。<br />
						elementsフォルダからの相対パスで指定します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$params</td>
					<td>
						エレメントテンプレートで利用できるようにする、変数名と値のリストをPHPの配列で指定します。<br />
						array(&#39;変数名&#39;,&#39;値&#39;)</td>
					<td>
						空</td>
				</tr>
				<tr>
					<td>
						$loadHelpers</td>
					<td>
						ヘルパーをロードするかどうかの真偽値</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$subDir</td>
					<td>
						呼び出されたURLのプレフィックスをサブフォルダとして指定するかどうかの真偽値。<br />
						例えば、true に設定した状態で、モバイル用のURLを呼び出すと、mobileというプレフィックスが利用され、$name の先頭にmobile/ という文字列が付加されます。<br />
						これは、下記の記述で・・・<br />
						<pre>
$baser-&gt;element(&#39;header&#39;)</pre>
						次のエレメントを出力するを指します。
						<pre>
{テンプレートフォルダ}/elements/mobile/header.ctp</pre>
					</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>ページネーションを出力する</span></h4>
		<p>
			<strong>$baser-&gt;pagination( [$name] , [$params] , [$loadHelpers] , [$subDir] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$name</td>
					<td>
						ページネーションテンプレートの名前を指定します。<br />
						独自のページネーションテンプレートを作成する場合は、下記のフォルダーに設置します。<br />
						<pre>
{テンプレートフォルダ}/elements/paginations/</pre>
					</td>
					<td>
						&#39;default&#39;</td>
				</tr>
				<tr>
					<td>
						$params</td>
					<td>
						ページネーションテンプレートで利用できるようにする、変数名と値のリストをPHPの配列で指定します。<br />
						array(&#39;変数名&#39;=&gt;&#39;値&#39;)</td>
					<td>
						空</td>
				</tr>
				<tr>
					<td>
						$loadHelpers</td>
					<td>
						ヘルパーをロードするかどうかの真偽値</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$subDir</td>
					<td>
						呼び出されたURLのプレフィックスをサブフォルダとして指定するかどうかの真偽値。<br />
						例えば、true に設定した状態で、モバイル用のURLを呼び出すと、mobileというプレフィックスが利用され、$name の先頭にmobile/ という文字列が付加されます。<br />
						これは、下記の記述で・・・
						<pre>
$baser-&gt;element(&#39;default&#39;)</pre>
						次のエレメントを出力するを指します。
						<pre>
{テンプレートフォルダ}/elements/mobile/paginations/default.ctp</pre>
					</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>ページ編集画面へのリンクを出力する</span></h4>
		<p>
			<strong>$baser-&gt;editPage( $id )</strong></p>
		<p>
			この関数は、ページ管理機能で、WEBページを登録、編集すると自動的に対象のページテンプレートに記述されます。</p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$id</td>
					<td>
						編集対象ページを特定するID番号を指定する</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>charsetメタタグを出力する</span></h4>
		<p>
			<strong>$baser-&gt;charset( $charset )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$charset</td>
					<td>
						エンコーディング</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>コピーライト用の年を出力する</span></h4>
		<p>
			<strong>$baser-&gt;copyYear( $begin )</strong></p>
		<p>
			この関数は、コピーライト用に利用する開設した年と現在の年を表示するだけのシンプルな関数です。<br />
			（例）2007 - 2010</p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$begin</td>
					<td>
						開始年</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>BaserCMSが設置されているパスを出力する</span></h4>
		<p>
			<strong>$baser-&gt;root()</strong></p>
		<p>
			この関数は、BaserCMSが設置されているベースとなるパスを出力するだけのシンプルな関数です。 （例）/</p>
		<h4>
			<span>コンテンツ本体を出力する</span></h4>
		<p>
			<strong>$baser-&gt;content()</strong></p>
		<p>
			この関数はレイアウトテンプレートで利用します。コンテンツの中身を出力する場所にこの関数を配置します。</p>
		<h4>
			<span>セッションメッセージを出力する</span></h4>
		<p>
			<strong>$baser-&gt;flash()</strong></p>
		<p>
			セッションに保存されたCakePHP用のメッセージを表示します。</p>
		<h4>
			<span>コンテンツを特定するIDを出力する</span></h4>
		<p>
			<strong>$baser-&gt;contentsName( [$detail] )</strong></p>
		<p>
			bodyタグ等にid属性として設定し、コンテンツごとに適用されるCSSを切り替えたりする場合に便利です。<br />
			具体的には、該当ページの URLにおいて、設置フォルダから最初のスラッシュまでの文字をキャメルケースで出力します。<br />
			（例）http://xxx.xx/contact/index の場合、「Contact」を出力</p>
		<pre>
&lt;body id=&quot;&lt;?php $baser-&gt;contentsName() ?&gt;&quot;&gt;</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$detail</td>
					<td>
						true に設定すると詳細な名称までを取得します。<br />
						（例）http://xxx.xx/contact/index の場合、「ContactIndex」を出力</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>パンくずリストを出力する</span></h4>
		<p>
			<strong>$baser-&gt;crumbs( [$separator] , [$startText] )</strong></p>
		<p>
			この関数は、ナビゲーションとしてよく利用されている「パンくずリスト」を出力する関数です。<br />
			適切なパンくずリストを出力するには、あらかじめ $baser-&gt;addCrumb() 関数で、パンくずの要素を追加しておく必要があります。</p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$separator</td>
					<td>
						区切り文字</td>
					<td>
						&amp;raquo;（&raquo;）</td>
				</tr>
				<tr>
					<td>
						$startText</td>
					<td>
						トップページとして指定するテキスト<br />
						指定するとパンくずリストの先頭に指定したテキストでトップページへのリンクが追加される。</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<pre>
（例）
&lt;?php $baser-&gt;addCrumb(&#39;会社案内&#39;,&#39;/company/index.html&#39;) ?&gt;
&lt;?php $baser-&gt;addCrumb(&#39;沿革&#39;) ?&gt;
&lt;?php $baser-&gt;crumbs(&#39;&gt;&#39; , &#39;ホーム&#39;) ?&gt;

【出力結果】
ホーム &gt; 会社案内 &gt; 沿革
				</pre>
		<h3>
			<span>BaserHelper 取得系命令</span></h3>
		<p>
			取得系命令は、出力系命令のようにそのまま出力するのではなく、関数が生成したデータの中身を一旦取得して、加工してから出力したい場合などに利用します。<br />
			加工等を行ったデータを出力する場合は、PHPの echo や print 等の出力命令で明示的に出力する必要があります。</p>
		<h4>
			<span>タイトルタグを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getTitle( [$separator] , [$categoriTitleOn] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$separator</td>
					<td>
						区切り文字を指定する</td>
					<td>
						&#39;｜&#39;（縦棒）</td>
				</tr>
				<tr>
					<td>
						$categoryTitleOn</td>
					<td>
						カテゴリタイトルの出力有無。<br />
						もしくは、カテゴリ名として出力したい文字を指定する。</td>
					<td>
						属するカテゴリのタイトル</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>コンテンツタイトルを取得する</span></h4>
		<p>
			<strong>$baser-&gt;contentsTitle()</strong></p>
		<p>
			$baser-&gt;getTitle()では、サイト名やカテゴリ名等を含んだタイトルを取得できますが、$baser-&gt;getContentsTitle()では、純粋にコンテンツページのタイトルのみを取得できます。</p>
		<h4>
			<span>キーワードを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getKeywords()</strong></p>
		<p>
			コンテンツテンプレート側で何も指定がない場合は、管理画面のサイト基本設定で指定されたサイト基本キーワードが取得できます。<br />
			個別に指定する場合は、コンテンツテンプレートに下記の１行を記述します。</p>
		<pre>
$baser-&gt;setKeywords(&#39;キーワードテキスト&#39;)</pre>
		<h4>
			<span>ページ説明文を取得する</span></h4>
		<p>
			<strong>$baser-&gt;getDescription()</strong></p>
		<p>
			コンテンツテンプレート側で何も指定がない場合は、管理画面のサイト基本設定で指定されたサイト基本説明文が取得できます。<br />
			個別に指定する場合は、コンテンツテンプレートに下記の１行を記述します。</p>
		<pre>
$baser-&gt;setDescription(&#39;説明文テキスト&#39;)</pre>
		<h4>
			<span>グローバルメニューを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getGlobalMenus( [$menuType] )</strong></p>
		<p>
			グローバルメニューのリストをCakePHPのモデル形式の配列で取得できます。</p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$menuType</td>
					<td>
						管理画面で指定したメニュータイプ<br />
						公開ページ・・・default<br />
						管理画面・・・admin</td>
					<td>
						default</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>BaserCMSが設置されているパスを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getRoot()</strong></p>
		<p>
			この関数は、BaserCMSが設置されているベースとなるパスを取得するだけのシンプルな関数です。</p>
		<h4>
			<span>相対パスから実際のパスを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getUrl( $url , [$full] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$url</td>
					<td>
						相対パス</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$full</td>
					<td>
						絶対URLを返すかどうかの真偽値</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>エレメント（部品）テンプレートを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getElement( $name , [$params] , [$loadHelpers] , [$subDir] )</strong></p>
		<p>
			&nbsp;</p>
		<pre>
</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$name</td>
					<td>
						エレメントテンプレート名。<br />
						elementsフォルダからの相対パスで指定します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$params</td>
					<td>
						エレメントテンプレートで利用できるようにする、変数名と値のリストをPHPの配列で指定します。<br />
						array(&#39;変数名&#39;,&#39;値&#39;)</td>
					<td>
						空</td>
				</tr>
				<tr>
					<td>
						$loadHelpers</td>
					<td>
						ヘルパーをロードするかどうかの真偽値</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$subDir</td>
					<td>
						呼び出されたURLのプレフィックスをサブフォルダとして指定するかどうかの真偽値。<br />
						例えば、true に設定した状態で、モバイル用のURLを呼び出すと、mobileというプレフィックスが利用され、$name の先頭にmobile/ という文字列が付加されます。<br />
						これは、下記の記述で・・・
						<pre>
$baser-&gt;getElement(&#39;header&#39;)</pre>
						次のエレメントを取得する事を指します。
						<pre>
{テンプレートフォルダ}/elements/mobile/header.ctp</pre>
					</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>画像読み込みタグを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getImg( $path , [$options] )</strong></p>
		<p>
			&nbsp;</p>
		<pre>
</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$path</td>
					<td>
						画像ファイルまでのパス。先頭にスラッシュをつけた場合は、/app/webroot/ からのパスとなる。スラッシュをつけず相対パスとした場合は、/app/webroot/img/ からのパスとなる。</td>
					<td>
						&minus;</td>
				</tr>
				<tr>
					<td>
						$options</td>
					<td>
						要素の属性等</td>
					<td>
						空</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>アンカータグを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getLink( $title , $url , [$htmlAttributes] , [$confirmMessage] , [$escapeTitle] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$title</td>
					<td>
						アンカータグのラベル</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$url</td>
					<td>
						リンク先のパス<br />
						サイト内のページを指定するいは、BaserCMSの設置場所を起点としてスラッシュから始まる絶対パスを指定する。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$htmlAttributes</td>
					<td>
						要素の属性</td>
					<td>
						空</td>
				</tr>
				<tr>
					<td>
						$confirmMessage</td>
					<td>
						移動前の確認メッセージ</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$escapeTitle</td>
					<td>
						$titleをエスケープするかどうかの真偽値</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>コンテンツを特定するIDを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getContentsName( [$detail] )</strong></p>
		<p>
			bodyタグ等にid属性として設定し、コンテンツごとに適用されるCSSを切り替えたりする場合に便利です。<br />
			具体的には、該当ページの URLにおいて、設置フォルダから最初のスラッシュまでの文字をキャメルケースで取得します。<br />
			（例）http://xxx.xx/contact/index の場合、「Contact」を取得</p>
		<pre>
&lt;body id=&quot;&lt;?php echo $baser-&gt;getContentsName(true) ?&gt;&quot;&gt;</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$detail</td>
					<td>
						true に設定すると詳細な名称までを取得します。<br />
						（例）http://xxx.xx/contact/index の場合、「ContactIndex」を取得</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>ページ機能で作成したページの一覧データを取得する</span></h4>
		<p>
			<strong>$baser-&gt;getPageList( [$pageCategoryNo] )</strong></p>
		<p>
			タイトルと URL の配列データとして取得します。ローカルナビゲーション等に利用すると便利です。</p>
		<pre>
$pages = $baser-&gt;getPageList({ページカテゴリNO});
foreach($pages as $page){
	echo $page[&#39;url&#39;];
	echo $page[&#39;title&#39;];
}</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$pageCategoryNo</td>
					<td>
						ページカテゴリに割り振られたNO を指定すると、該当カテゴリに属するページの一覧データを取得します。<br />
						<small>※ ページカテゴリNO は管理画面のページカテゴリ一覧より確認します。</small></td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h3>
			<span>BaserHelper 設定系命令</span></h3>
		<p>
			設定系命令は、出力系命令や、取得系命令の生成するデータに影響を与える為の設定命令です。<br />
			主に、ページテンプレートなどのコンテンツ側から、レイアウトテンプレートが出力する内容を設定するのに利用します。</p>
		<h4>
			<span>レイアウトで利用する為の変数を設定する</span></h4>
		<p>
			<strong>$baser-&gt;set( $key , $value )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$key</td>
					<td>
						レイアウト側で利用する変数名</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$value</td>
					<td>
						変数に設定する値</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>タイトルを設定する</span></h4>
		<p>
			<strong>$baser-&gt;setTitle( $title , $categoryTitleOn )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$title</td>
					<td>
						タイトルタグに表示するタイトルを設定します。<br />
						<span class="Notice">※ &#39;&#39;（空文字）を指定した場合、サイト名のみがタイトルタグとして出力されます。</span></td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$categoryTitleOn</td>
					<td>
						カテゴリタイトルの出力有無。<br />
						もしくは、カテゴリ名として出力したい文字を指定する</td>
					<td>
						属するカテゴリのタイトル</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>キーワードを設定する</span></h4>
		<p>
			<strong>$baser-&gt;setKeywords( $keywords )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$keywords</td>
					<td>
						キーワードを指定する</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>説明文を設定する</span></h4>
		<p>
			<strong>$baser-&gt;setDescription( $description )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$description</td>
					<td>
						説明文を指定する</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>タイトルへのカテゴリタイトルの出力有無を設定する</span></h4>
		<p>
			<strong>$baser-&gt;setCategoryTitle( $on )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$on</td>
					<td>
						カテゴリタイトルの出力有無。<br />
						もしくは、カテゴリ名として出力したい文字を指定する</td>
					<td>
						true</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>サブメニューを設定する</span></h4>
		<p>
			<strong>$baser-&gt;setSubMenus( $submenus )</strong></p>
		<p>
			この関数は、BaserCMSが用意しているsidebarエレメント、submenuエレメント、または、$subMenuElements テンプレート変数を利用する場合にのみ有効となります。<br />
			利用する場合には、下記フォルダの中に、サブメニュー用のエレメント（部品）を設置します。</p>
		<pre>
{テンプレートフォルダ}/elements/submenus/</pre>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$submenus</td>
					<td>
						サブメニューのテンプレート名を拡張子なしで、PHPの配列として指定する</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>パンくずリストの要素を追加する</span></h4>
		<p>
			<strong>$baser-&gt;addCrumb( $name , [$link] , [$options] )</strong></p>
		<p>
			この関数は、ナビゲーションとしてよく利用されている「パンくずリスト」の要素を追加する関数です。<br />
			最終的にパンくずリストを出力するには、$baser-&gt;crumbs() 関数を利用します。</p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$name</td>
					<td>
						要素のテキスト</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$link</td>
					<td>
						要素のリンク先。<br />
						$baser-&gt;link()関数と同じ指定方法で指定する。<br />
						省略した場合には、テキストのみが出力されます。</td>
					<td>
						null</td>
				</tr>
			</tbody>
		</table>
		<pre>
（例）
&lt;?php $baser-&gt;addCrumb(&#39;会社案内&#39;,&#39;/company/index.html&#39;) ?&gt;
        </pre>
		<h3>
			<span>BaserHelper 判定系命令</span></h3>
		<p>
			判定系命令は、条件によって処理内容や表示内容を変更する場合に利用します。<br />
			PHPのif文等で利用します。</p>
		<h4>
			<span>現在のページがトップページかどうかを判定する</span></h4>
		<p>
			<strong>$baser-&gt;isTop()</strong></p>
		<p>
			現在のページがトップページの場合は true を返し、そうでない場合は false を返します。 トップページのみ特別な表示方法を行いたい場合などに利用します。</p>
		<pre>
（例）トップページのみに特定の内容を表示したい場合
&lt;?php if($baser-&gt;isTop()): ?&gt;
&lt;!-- トップページのみに出力する内容 --&gt;
&lt;?php endif ?&gt;
        </pre>
	</div>
	<div class="Section" id="section2">
		<h2>
			<span>BlogHelper</span></h2>
		<p>
			Blogプラグインで利用可能な関数の一覧です。 BaserHelperと同様、各関数は、出力系、取得系、設定系、判定系と４つのグループにわけられています。</p>
		<h3>
			<span>BlogHelper 出力系命令</span></h3>
		<p>
			出力系の命令は、PHPにおける echo や print 等の出力命令を付与せずとも、関数を配置しただけでそのまま出力される命令を指します。</p>
		<h4>
			<span>ブログタイトルを出力する</span></h4>
		<p>
			<strong>$blog-&gt;title()</strong></p>
		<p>
			管理画面で設定したブログのタイトルを出力します。</p>
		<h4>
			<span>ブログの説明文を出力する</span></h4>
		<p>
			<strong>$blog-&gt;description()</strong></p>
		<p>
			管理画面で設定したブログの説明文を出力します。</p>
		<h4>
			<span>記事のタイトルを出力する</span></h4>
		<p>
			<strong>$blog-&gt;postTitle( $post )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>記事の本文を表示する</span></h4>
		<p>
			<strong>$blog-&gt;postContent( $post , [$moreText] , [$moreLink] , [$cut] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$moreText</td>
					<td>
						詳細文を表示するかどうかの真偽値</td>
					<td>
						true</td>
				</tr>
				<tr>
					<td>
						$moreLink</td>
					<td>
						詳細文を表示しない場合、詳細文へのリンクを表示するかどうかを指定します。</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$cut</td>
					<td>
						コンテンツを指定した文字数でカットする場合には、文字数を指定します。<br />
						指定した場合、HTMLタグは除去されます。<br />
						&nbsp;</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>記事が属するカテゴリ名をカテゴリ一覧へのリンク付で出力する</span></h4>
		<p>
			<strong>$blog-&gt;category( $post )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>記事の登録日を出力する</span></h4>
		<p>
			<strong>$blog-&gt;postDate( $post , [$format] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$format</td>
					<td>
						日付のフォーマットを指定します。</td>
					<td>
						&#39;Y/m/d&#39;</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>記事の投稿者を出力する</span></h4>
		<p>
			<strong>$blog-&gt;author( $post )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>記事編集画面へのリンクを出力する</span></h4>
		<p>
			<strong>$baser-&gt;editPage( $blogContentId , $blogPostId )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$blogContentId</td>
					<td>
						ブログを特定するID番号を指定します。<br />
						通常は、$blogContent[&#39;BlogContent&#39;][&#39;id&#39;]と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$blogPostId</td>
					<td>
						ブログ記事を特定するID番号を指定します。<br />
						ブログ記事を出力するループ内では、$post[&#39;BlogPost&#39;][&#39;id&#39;]と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>前の記事へのリンクを出力する</span></h4>
		<p>
			<strong>$blog-&gt;prevLink( $post , [$title] , [$htmlAttributes] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$title</td>
					<td>
						リンクのタイトルを指定します。</td>
					<td>
						前の記事のタイトル</td>
				</tr>
				<tr>
					<td>
						$htmlAttributes</td>
					<td>
						属性をPHPの配列で指定します。</td>
					<td>
						class・・・&#39;prev-link&#39;<br />
						arrow・・・&#39;≪ &#39;</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>次の記事へのリンクを出力する</span></h4>
		<p>
			<strong>$blog-&gt;nextLink( $post , [$title] , [$htmlAttributes] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$title</td>
					<td>
						リンクのタイトルを指定します。</td>
					<td>
						前の記事のタイトル</td>
				</tr>
				<tr>
					<td>
						$htmlAttributes</td>
					<td>
						属性をPHPの配列で指定します。</td>
					<td>
						class・・・&#39;next-link&#39;<br />
						arrow・・・&#39; ≫&#39;</td>
				</tr>
			</tbody>
		</table>
		<h3>
			<span>BlogHelper 取得系命令</span></h3>
		<p>
			取得系命令は、出力系命令のようにそのまま出力するのではなく、関数が生成したデータの中身を一旦取得して、加工してから出力したい場合などに利用します。<br />
			加工等を行ったデータを出力する場合は、PHPの echo や print 等の出力命令で明示的に出力する必要があります。</p>
		<h4>
			<span>ブログのタイトルを取得する</span></h4>
		<p>
			<strong>$blog-&gt;getTitle()</strong></p>
		<h4>
			<span>ブログの説明文を取得する</span></h4>
		<p>
			<strong>$blog-&gt;getDescription()</strong></p>
		<h4>
			<span>記事の本文を取得する</span></h4>
		<p>
			<strong>$blog-&gt;getPostContent( $post, [$moreText] , [$moreLink] , [$cut] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$moreText</td>
					<td>
						詳細文を表示するかどうかの真偽値</td>
					<td>
						true</td>
				</tr>
				<tr>
					<td>
						$moreLink</td>
					<td>
						詳細文を表示しない場合、詳細文へのリンクを表示するかどうかを指定します。</td>
					<td>
						false</td>
				</tr>
				<tr>
					<td>
						$cut</td>
					<td>
						コンテンツを指定した文字数でカットする場合には、文字数を指定します。<br />
						指定した場合、HTMLタグは除去されます。<br />
						&nbsp;</td>
					<td>
						false</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>記事が属するカテゴリ名をカテゴリ一覧へのリンク付で取得する</span></h4>
		<p>
			<strong>$blog-&gt;getCategory( $post )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$post</td>
					<td>
						ブログ記事のデータを指定します。ブログ記事を出力するループ内では「$post」と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>カテゴリ一覧へのURLを取得する</span></h4>
		<p>
			<strong>$blog-&gt;getCategoryUrl( $blogCategoryId )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$blogCategoryId</td>
					<td>
						カテゴリを特定するID番号を指定します。<br />
						ブログ記事を出力するループ内では$post[&#39;BlogPost&#39;][&#39;blog_category_id&#39;]と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
		<h4>
			<span>カテゴリーの一覧をリストタグで取得する</span></h4>
		<p>
			<strong>$blog-&gt;getCategoryList( $categories , [$depth] )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$categories</td>
					<td>
						カテゴリーデータをCakePHPのモデル形式の配列で指定します。</td>
					<td>
						-</td>
				</tr>
				<tr>
					<td>
						$depth</td>
					<td>
						出力するカテゴリー一覧の階層の深さを指定します。</td>
					<td>
						3</td>
				</tr>
			</tbody>
		</table>
		<h3>
			<span>BlogHelper 判定系命令</span></h3>
		<p>
			判定系命令は、条件によって処理内容や表示内容を変更する場合に利用します。<br />
			PHPのif文等で利用します。</p>
		<h4>
			<span>ブログの説明文が指定されているかどうかを判定する</span></h4>
		<p>
			<strong>$blog-&gt;descriptionExists()</strong></p>
	</div>
	<div class="Section" id="section3">
		<h2>
			<span>MailHelper</span></h2>
		<p>
			Mailプラグインで利用可能な関数の一覧です。 BaserHelperと同様、各関数は、出力系、取得系、設定系、判定系と４つのグループにわけられています。<br />
			<span class="Notice">※ 現在は、出力系のみです。</span></p>
		<h3>
			<span>MailHelper 出力系命令</span></h3>
		<p>
			出力系の命令は、PHPにおける echo や print 等の出力命令を付与せずとも、関数を配置しただけでそのまま出力される命令を指します。</p>
		<h4>
			<span>管理画面のメールフィールド一覧ページへのリンクを出力する</span></h4>
		<p>
			<strong>$blog-&gt;indexFields( $mailContentId )</strong></p>
		<table>
			<tbody>
				<tr>
					<th scope="col">
						引数名</th>
					<th scope="col">
						説明</th>
					<th scope="col">
						初期値</th>
				</tr>
				<tr>
					<td>
						$mailContentId</td>
					<td>
						メールフォームを特定するID番号。<br />
						通常は、$mailContent[&#39;MailContent&#39;][&#39;id&#39;]と記述すれば動作します。</td>
					<td>
						-</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
<p>
	&nbsp;</p>
