EC-CUBEのPCページでタイトルタグの中身を修正したのに合わせて、モバイルページでもタイトルタグの中身を変更します。
商品詳細ページのタイトル変更
商品詳細ページのタイトルは、デフォルトで「商品詳細 商品名|サイト名」という並び順になっています。
商品名、サイト名は問題ありませんが、固定で「商品詳細」と表示されるのは、あまりよくないため、削除します。
/data/class/page/products/LC_Page_Products_Detail.php の function mobileProcess() を
/data/class_extends/page_extends/products/LC_Page_Products_Detail_Ex.php の function destroy() の下にペーストする。
【変更前】
$this->tpl_title = "商品詳細 ". $this->arrProduct["name"];
【変更後】
$this->tpl_title = $this->arrProduct["name"];
商品一覧ページのタイトル変更
商品一覧ページは携帯の場合、cotegory_list.phpと、list.phpの2つを使っていますが、
まずは、list.php(小カテゴリ)のページタイトルを修正します。
/data/class/page/products/LC_Page_Products_list.php の function mobileProcess() を
/data/class_extends/page_extends/products/LC_Page_Products_list_Ex.php の function destroy() の下にペーストする。
function mobileProcess() の中に、$this->tpl_title = “商品一覧”;と1行追加する。
$this->tpl_title = "商品一覧";
TOPページのタイトルを変更する
/data/class/page/LC_Page_Products_Index.php の function mobileProcess() を
/data/class_extends/page_extends/LC_Page_Index_Ex.php の function destroy() の下にペーストする。
function mobileProcess() の中に、$this->tpl_title = “TOPページ”;と1行追加する。
$this->tpl_title = "TOPページ";
タイトルタグの変更
/data/Smarty/templates/default/mobile/site_frame.tplを編集。