Copy and paste (override) the following code where Loader::element('header_required');
is.
- Page Title - Site name
- Page Title | Page Title of 1st page - Site name
Since concrete5.7.5.7, the site name supports multilingual. Register your site name in Engish at [Dashboard] - [System & Setting] - [Basics] - [Site Name]. And then, use [Dashboard] - [System and Setting] - [Multilingual] - [Translation Interface] to enter the multilingual site name.
You can define your page description and page keyword programmatically. My sample code will try to use the programmatically defined $pageDescrition and $pageMetaKeywords, but if the admin already set Meta Description or Collection Descriton, then concrete5 will try to use those first.
- Page Title - Site name
- Page Title | Page Title of Parent page - Site name
次のコードを、 concrete5 のテーマファイルで Loader::element('header_required');
が記述されている行に貼り付けてください。
- トップ & 第1階層ページ: [ページタイトル] - [サイト名]
- 第2階層以降のページ: [ページタイトル] | [第1階層のページタイトル] - [サイト名]
concrete5.7.5.7 より、サイト名が多言語対応になりました。[管理画面] - [システムと設定] - [基本] - [サイト名] は英語のサイト名を記入してください。日本語を含むその他の言語のサイト名は、[管理画面] - [システムと設定] - [多言語] - [翻訳インターフェース]で行えます。
Meta Description と Meta Keywords をプログラム的に指定できます。 サンプルコードでは $pageDescrition と $pageMetaKeywords がこのコードの前に設定されていたらそれを使うというサンプルです。
サイト管理者が通常のように Meta 属性や、ページ説明を入力していれば、それが優先されるというようにしています。
- トップ & 第1階層ページ: [ページタイトル] - [サイト名]
- 第2階層以降のページ: [ページタイトル] | [親ページタイトル] - [サイト名]