docomo
http://www.nttdocomo.co.jp/service/imode/make/content/html/notice/basis/index.html#p06
http://www.nttdocomo.co.jp/service/imode/make/content/html/notice/basis/index.html#p06
<?php if (has_slot('slot')): ?>
<?php include_slot('slot') ?>
<?php else: ?>
ここにデフォルトのものを入れる。
actionの変数はここでは使えません。
<?php endif; ?>
<?php slot('slot') ?>
ここに内容を書く。
ここでは当然actionの変数が使えます。
<?php end_slot() ?>
# タイトル変更
$this->getResponse()->setTitle('タイトル');
# キーワード変更
$this->getResponse()->addMeta('keywords', 'キー1,キー2');
# ディスクリプション変更
$this->getResponse()->addMeta('description', 'ディスクリプション,'ディスクリプション');
モジュールのアクションクラスで
//title属性\\ $this->getResponse()->setTitle($value); //meta属性 $this->getResponse()->addHttpMeta($key, $value) $this->getResponse()->addMeta($key, $value)
のように設定すればページごとにmeta情報を動的に生成することが可能です。
たとえば以下のように設定したい場合は
title→テスト
description→概要
keywords→PHP,MySQL
$this->getResponse()->setTitle('テスト');
$this->getResponse()->addMeta('description','概要');
$this->getResponse()->addMeta('keywords', 'PHP, MySQL');
とすることで設定可能です。