この方法はデフォルトのテンプレートを利用している場合に限った説明になります。
テンプレートの編集が難しい場合、サポートへお問い合わせ下さい。ご要望を伺い、作業を承ることも可能です。
デフォルトでは上図のようなグローバルナビゲーションを表示しています。
グローバルナビゲーションの変更
管理画面のデザイン管理管理>テンプレート管理から直接HTMLを修正します。
ナビゲーションが表示されている箇所のテンプレートはPC版が共通ヘッダー
、スマートフォン版が共通メニュー
になります。
PC版ではカテゴリの表示も含んでいます。
<ul class="globalNav" role="navigation"> {% set root_categories = get_root_categories() %} {% if root_categories|length %} <li class="dropdown"> <a class="dropdown-toggle" href="javascript:void(0);">動画カテゴリー <i class="fa fa-caret-down fa-lg"></i></a> <ul class="dropdown-menu"> {% for parent in root_categories %} <li><a href="{{url_for('products_category', parent)}}">{{parent.getDisplayName()}}</a></li> {% for child in parent.getChildren() %} <li class="dropdown-sub"><a href="{{url_for('products_category', child)}}">{{child.getDisplayName()}}</a></li> {% endfor %} {% endfor %} </ul> </li> {% endif %} <li>{{link_to(__('お気に入り'), '@favorite_list')|raw}}</li> {% if payment_plugin_is_enabled() %} <li>{{link_to(__('購入履歴'), '@payment_history')|raw}}</li> {% endif %} <li>{{link_to(__('お知らせ'), '@announce_list')|raw}}</li> </ul>
<ul class="sidemenuNavi"> <li>{{link_to(__('<i class="fa fa-star"></i> お気に入り'), '@favorite_list')|raw}}</li> {% if payment_plugin_is_enabled() %} <li>{{link_to(__('<i class="fa fa-list"></i> 購入履歴'), '@payment_history')|raw}}</li> {% endif %} <li>{{link_to(__('<i class="fa fa-info-circle"></i> お知らせ'), '@announce_list')|raw}}</li> </ul>
HTMLのリストタグを利用していますので、ここに必要なものを追加したり、削除することで変更が可能です。
実装例 ログインしている場合にリンクを表示する
例えば、お気に入りと購入履歴をログインしている場合のみ表示するように変更します。
<ul class="globalNav" role="navigation"> {% set root_categories = get_root_categories() %} {% if root_categories|length %} <li class="dropdown"> <a class="dropdown-toggle" href="javascript:void(0);">動画カテゴリー <i class="fa fa-caret-down fa-lg"></i></a> <ul class="dropdown-menu"> {% for parent in root_categories %} <li><a href="{{url_for('products_category', parent)}}">{{parent.getDisplayName()}}</a></li> {% for child in parent.getChildren() %} <li class="dropdown-sub"><a href="{{url_for('products_category', child)}}">{{child.getDisplayName()}}</a></li> {% endfor %} {% endfor %} </ul> </li> {% endif %} {% if sf_user.isLogin() %} <li>{{link_to(__('お気に入り'), '@favorite_list')|raw}}</li> {% if payment_plugin_is_enabled() %} <li>{{link_to(__('購入履歴'), '@payment_history')|raw}}</li> {% endif %} {% endif %} <li>{{link_to(__('お知らせ'), '@announce_list')|raw}}</li> </ul>
<ul class="sidemenuNavi"> {% if sf_user.isLogin() %} <li>{{link_to(__('<i class="fa fa-star"></i> お気に入り'), '@favorite_list')|raw}}</li> {% if payment_plugin_is_enabled() %} <li>{{link_to(__('<i class="fa fa-list"></i> 購入履歴'), '@payment_history')|raw}}</li> {% endif %} {% endif %} <li>{{link_to(__('<i class="fa fa-info-circle"></i> お知らせ'), '@announce_list')|raw}}</li> </ul>
ポイントは{% if sf_user.isLogin() %}~{% endif %}
でログインしている時に表示するものを囲むことです。