質問 > その他 > default_frame.twigの編集 |
その他
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
ax1701 |
投稿日時: 2019/4/16 13:49
対応状況: 確認中
|
一人前 登録日: 2018/6/11 居住地: 投稿: 95 |
default_frame.twigの編集 [EC-CUBE] 3.0.16、新規インストール
[レンタルサーバ] さくら共用プレミアム [OS] FreeBSD [PHP] PHP 7.1.17 [データベース] MySQL 5.7 [WEBサーバ] Apache 2.4系 [ブラウザ] IE 11.0.65 [導入プラグインの有無] 無効化中 [カスタマイズの有無] 某社 2カラムデザインテンプレート使用中 現在運用してます。 質問内容 SEO対策で商品ごとのページのフリーエリアの文章をdiscription に設定したいと考えています。 コンテンツ管理ー商品詳細ページでは共通設定しか出来ないからです。現在の設定で<title>は問題ありません。 以下のファイルを改良すればよいのでしょうか? またやり方は記述のような方法で良いのでしょうか? 追加・修正した部分は行番号を入れていません。 このような事をするのは初めてですので教えて戴けないでしょうか? app/template/sxxxx(購入したデザインテンプレートのフォルダ名)/default_frame.twig 現状 1 <title>{% if subtitle is defined and subtitle is not empty %}{{ subtitle }} / {% elseif title is defined and title is not empty %}{{ title }} / {% endif %}{{ BaseInfo.shop_name }}</title> 2 {% if PageLayout.author is not empty %} 3 <meta name="author" content="{{ PageLayout.author }}"> 4 {% endif %} 5 {% if PageLayout.description is not empty %} 6 <meta name="description" content="{{ PageLayout.description }}"> 7 {% endif %} 8 {% if PageLayout.keyword is not empty %} 9 <meta name="keywords" content="{{ PageLayout.keyword }}"> 10 {% endif %} 11 {% if PageLayout.meta_robots is not empty %} 12 <meta name="robots" content="{{ PageLayout.meta_robots }}"> 13 {% endif %} 修正 1 <title>{% if subtitle is defined and subtitle is not empty %}{{ subtitle }} / {% elseif title is defined and title is not empty %}{{ title }} / {% endif %}{{ BaseInfo.shop_name }}</title> 2 {% if PageLayout.author is not empty %} 3 <meta name="author" content="{{ PageLayout.author }}"> {% elseif PageLayout.url == "product_detail" %} <meta name="description" content="{{ include(template_form_string(product.freearea)) }}"> {% else %} <meta name="description" content="{{ PageLayout.description }}"> {% endif %} 8 {% if PageLayout.keyword is not empty %} 9 <meta name="keywords" content="{{ PageLayout.keyword }}"> 10 {% endif %} 11 {% if PageLayout.meta_robots is not empty %} 12 <meta name="robots" content="{{ PageLayout.meta_robots }}"> 13 {% endif %} |
フラット表示 | 前のトピック | 次のトピック |