Tutorial:Introduction to Joomla! templates/ja
出典: Joomla! ドキュメンテーション
This introductory tutorial will give you an insight into the Joomla! templating system and what you can do with it.
目次 |
What is the purpose of a template?
A template controls the overall look and layout of a site. It provides the framework that brings together common elements, modules and components as well as providing the cascading style sheet for the site. Both the front-end and the back-end of the site have templates.
When Joomla! is first installed several templates are automatically included. You can find many more templates at other websites. Some are available without charge under various licenses, and some are for sale. In addition, there are many developers available who can make custom templates. You can also make your own template.
Templates are managed with the Template Manager, which is located on the Extensions menu in the back-end (administrator) area of your site.
Why does Joomla! Use templates? [A real beginners guide!]
The way Joomla! is designed separates out the key tasks involved in producing a website for efficient maintenance of the software. One of these tasks is to create the aesthetic (the look, feel and layout) of the site. This includes making decisions such as which content elements (components, modules and plugins) you may want to place in any given page.
When producing a web page, the location of most elements will stay the same (menus, banner locations, sidebars etc.). Additionally, you will want to create the same look (fonts, header styles, colour scheme etc.) for every page. For some parts of the site you may want to alter the general feel to indicate a different purpose for those pages (such as a blog section). A little planning is required for this, but once you have settled on the overall layout for your site, you then have the task of producing each page of content.
And that’s where the template comes in. You can either write all the code for each page separately, or use a template for each major section of your site so that when you want to create a new page you simply “fill in the blanks”. Okay, perhaps its not that simple, but this tutorial is designed to give you a step by step guide for effective template use, starting with how to use one and ending with how to create one for yourself.
- Use one of the templates supplied with Joomla!
- Download one of the many free offerings from the internet.
- Pay for one to be modified or produced from scratch if your needs cannot be met any other way.
Summary – a template controls the look of your site and makes your life a great deal easier when creating new pages.
For further details on what you can achieve with templates go the next section, “What can I do with templates?”
What can you do with a template?
Joomla!に同梱されているテンプレート
Joomla! 1.5:-では以下のテンプレートがデフォルトインストールで同梱されています。
- Milkyway (デフォルトテンプレートです)。
- Beez
- こちらも参照: Customising the Beez template
- JA_Purity
テンプレートを切り替えるには
デフォルトのサイト (フロントエンド) あるいは 管理画面 (バックエンド)テンプレートを変更するには、以下のステップのようになります:
- 管理者(バックエンド)としてログインします。方法は次のドキュメントを参照: 管理者として(バックエンド)にログインするには
- クリック: エクステンション -> テンプレート管理
テンプレート管理ページが表示されます。
Note: エクステンション メニューにテンプレート管理 画面の選択肢が表示されない場合は、たいていサイト管理者としてログインしていない為だと思われます。最高管理者のみがこのメニューを扱うことができます。
ここから、フロントエンドとバックエンドのテンプレートの管理を行います。デフォルトビューではインストールされたフロントエンドテンプレートが表示されています。
フロントエンドのデフォルトテンプレートには★マークが付いています。; 下のイメージではrhuk_milkywayとなっています。
デフォルトテンプレートをbeezに変更するには:
- テンプレート名の左側にあるラジオボタンをクリックして選択します;
- ツールバーにある"デフォルト"をクリックします;
★マークがrhuk_milkywayからbeezに変更されていれば成功です。
フロントエンドに複数のテンプレートを割当てる
Joomla!は2つ以上のテンプレートをフロントエンドで割り当てるオプションがあります。これは"メニュー割当て"で行います。そうすればそれぞれのメニュー、あるいはある特定のメニューアイテムにに異なったテンプレートを割当てることができます。
クリックします: エクステンション -> テンプレート管理
インストールされているテンプレートが表示されます。ここでデフォルトとして設定されて いない テンプレートを選択します。 テンプレート名をクリック あるいは テンプレート名の左側にあるラジオボタンにチェックを入れ、そしてツールバーにある "編集" をクリックします。 "テンプレート: [ 編集 ]"ページになります。 "メニュー割当て"の"なし"から"一覧から選択" にラジオボタンを切り替え、テンプレートを表示させたいメニューアイテムを選択します。 ツールバーにある"保存"をクリックして完了です。
管理画面経由でインストール (パックされたテンプレートファイル)
サイトバックエンドにログイン (www.your-site.com/administrator/)
次の順にクリック: エクステンション -> インストール/アンインストール
"エクステンション管理" ページがあります。
ここからテンプレート、プラグイン、モジュール、コンポーネント、ランゲージをインストールできます。それには3つのオプションがあります:
- パッケージファイルのアップロード - (あなたのPCからパッケージを選択、それをアップロードしてインストール)
- ディレクトリからインストール - (パッケージが置かれているあなたのサーバーのパスを入力)
- URLからインストール - (パッケージのURLを入力)
ここでは、最初の方法: パッケージファイルのアップロード を選択します。
あなたのPCからパッケージを選択し、"アップロードファイル&インストール"ボタンをクリックします。
パッケージにエラーが含まれていなければ、それで完了、以下のような成功メッセージが表示されます。
FTP経由でインストール (パッケージされていないテンプレートファイル)
テンプレートはパッケージ化せずFTP経由でもインストールできます。単純にあなたのPCにあるテンプレートフォルダを選択し、あなたの好みのFTPソフトウェアを使ってあなたのサーバーにアップロードします。必ず次のディレクトリにテンプレートフォルダをアップロードします: /path_to_joomla/templates/ - この場所 /path_to_joomla/ はサーバーのJoomla!がインストールされている場所になります。この方法は主に自分自身でテンプレートを作成し、パッケージ化せずにインストールしたい時、あるいは一度に1つ以上のテンプレートをアップロードしたい時に用いられます。
Note: あなたが初心者ならコンポーネント、モジュール、プラグインのインストールにはFTPを利用しないでください。パッケージインストーラをバイパスするには、これらのアイテムは手動で挿入されたデータベースエントリが必要です。






