テーマの設定
a-blog cms のデータを表示するテーマファイルは、管理ページから設定します。 管理ページ > テーマ > テーマ設定 にアクセスしてください。 この画面は、siteテーマを使用しているブログのテーマ設定になります。
テーマセット機能は Ver. 3.1 から導入された機能のため、Ver. 3.0 以前のバージョンを利用の方は 管理ページ > コンフィグ > テーマ設定からテーマの変更ができます。
テーマディレクトリ名とテンプレート設定
テーマディレクトリ名には現在使用しているテーマ名が表示されており、a-blog cms 設置ディレクトリ/themes/ 以下にあるテーマディレクトリがプルダウンメニューで選択できます。 テーマディレクトリ内にtemplate.yaml がある場合、テンプレート設定のチェックをすることで、設定されたテンプレートを優先して読み込みます。
template.yaml ファイルは、テーマを使いまわす場合に毎回テンプレートファイルの設定をしなくて済むように、あらかじめテンプレートファイルの設定内容を記述しておくために設置します。 /themes/テーマディレクトリ/template.yaml にファイルを置くことで有効になります。
テンプレートファイル
テーマ設定画面のテンプレートファイルでは、以下の6種類のテンプレートを指定できます。
- トップページ(tpl_top)
- 一覧ページ(tpl_index)
- 詳細ページ(tpl_detail)
- エラーページ(404 Not Found)(tpl_404)
- 管理ページ(tpl_admin)
- 管理ログインページ(tpl_login)
このほか「Twigテンプレート」(tpl_twig)で Twig の有効・無効を切り替えます。
画面に無いテンプレートも、テーマの template.yaml または private/config.system.yaml で指定できます。
| キー | 既定値 | 用途 |
|---|---|---|
| tpl_admin-reset-password / tpl_admin-reset-password-auth | _member-admin/reset-password.html / _member-admin/reset-password-auth.html | 管理者のパスワード再設定 |
| tpl_admin-tfa-recovery | _member-admin/tfa-recovery.html | 管理者の2段階認証の解除 |
| tpl_signin / tpl_signup | _member/signin.html / _member/signup.html | 会員のログイン・登録 |
| tpl_reset-password / tpl_reset-password-auth | _member/reset-password.html / _member/reset-password-auth.html | 会員のパスワード再設定 |
| tpl_tfa-recovery | _member/tfa-recovery.html | 会員の2段階認証の解除 |
| tpl_update-profile / tpl_update-password / tpl_update-email / tpl_update-fta | _member/update-profile.html / _member/update-password.html / _member/update-email.html / _member/update-tfa.html | 会員のプロフィール・パスワード・メールアドレス・2段階認証の変更(tpl_update-fta は綴りのとおり) |
| tpl_withdrawal | _member/withdrawal.html | 会員の退会 |
| tpl_400 / tpl_403 / tpl_413 / tpl_500 / tpl_503 | 400.html / 403.html / 413.html / 500.html / 503.html | 各ステータスのエラーページ(template.yaml では指定できないので config.system.yaml で指定) |
テンプレートファイルについてより詳しく知りたい方は以下のドキュメントをご覧ください。
テンプレートの種類