「テンプレート:情報ボックス」の版間の差分
ナビゲーションに移動
検索に移動
細 (miss) |
(使用例をテンプレート:使用例に置き換え、最下部の「テンプレートを表示」を「表示・トーク・編集・履歴」に変更) |
||
6行目: | 6行目: | ||
{{情報ボックス | {{情報ボックス | ||
| name = | | name = | ||
| カテゴリ = | |||
| タイトル1 = | | タイトル1 = | ||
| タイトル2 = | | タイトル2 = | ||
... | ... | ||
| サブヘッダ = | | サブヘッダ = | ||
33行目: | 30行目: | ||
| テンプレート名 | | テンプレート名 | ||
| (なし) | | (なし) | ||
| | | この値にテンプレート名を指定すると、情報ボックスの最下部に「表示・トーク・編集・履歴」が表示されます。テンプレート名は、名前空間「テンプレート:」を省いて指定します。 | ||
|- | |- | ||
! | ! カテゴリ | ||
| テキスト | | テキスト | ||
| (なし) | | (なし) | ||
| | | 指定した名前のカテゴリが生成されます。ソートキーは「sortkey」に指定した値が渡されます。 | ||
|- | |- | ||
! | ! タイトル1<br> - タイトル10 | ||
| テキスト | |||
| | |||
| (なし) | | (なし) | ||
| | | タイトルに使用されるテキストです。最大10個を作成できます。 | ||
|- | |- | ||
! サブヘッダ | ! サブヘッダ | ||
60行目: | 52行目: | ||
| 画像を指定します。 | | 画像を指定します。 | ||
|- | |- | ||
! | ! 項目1 - 項目20 | ||
| テキスト | | テキスト | ||
| (なし) | | (なし) | ||
| | | 列のラベルを指定します。最大20個を作成できます。指定がない場合、ラベルなしの表示になります。 | ||
|- | |- | ||
! | ! 内容1 - 内容20 | ||
| テキスト | | テキスト | ||
| (なし) | | (なし) | ||
| | | 列の内容を指定します。最大20個を作成できます。指定がない場合、列は表示されません。 | ||
|- | |||
! class | |||
| クラス属性 | |||
| (なし) | |||
| table要素に指定されるclass属性を指定します。「タイトル1class」「内容1class」などを指定することもできます。 | |||
|- | |||
! style | |||
| スタイル属性 | |||
| (なし) | |||
| table要素に指定されるstyle属性を指定します。「タイトル1style」「内容1style」などを指定することもできます。 | |||
|} | |} | ||
== 使用例 == | == 使用例 == | ||
{{使用例}} | |||
[[カテゴリ:メタテンプレート|しようほうほつくす]] | |||
</noinclude><includeonly>{{#if: {{{カテゴリ|}}} | </noinclude><includeonly>{{#if: {{{カテゴリ|}}} | ||
| {{#ifeq: {{NAMESPACENUMBER}} | 0 | {{#if: {{{sortkey|}}} | | {{#ifeq: {{NAMESPACENUMBER}} | 0 | {{#if: {{{sortkey|}}} | ||
125行目: | 110行目: | ||
| <tr><td colspan="2" class="infobox-image-wrapper {{{画像class|}}}" style="{{{画像style|}}}">{{{画像}}}</td></tr> | | <tr><td colspan="2" class="infobox-image-wrapper {{{画像class|}}}" style="{{{画像style|}}}">{{{画像}}}</td></tr> | ||
}}{{#if: {{{内容1|}}} | {{#if: {{{項目1|}}} | }}{{#if: {{{内容1|}}} | {{#if: {{{項目1|}}} | ||
| <tr><th class="infobox-label">{{{項目1|}}}</th><td><div>{{{内容1}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目1style|}}}" class="{{{項目1class|}}}">{{{項目1|}}}</th><td class="infobox-data {{{内容1style|}}}" class="{{{内容1class|}}}"><div>{{{内容1}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容1}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容1style|}}}" class="{{{内容1class|}}}"><div>{{{内容1}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容2|}}} | {{#if: {{{項目2|}}} | }}{{#if: {{{内容2|}}} | {{#if: {{{項目2|}}} | ||
| <tr><th class="infobox-label">{{{項目2|}}}</th><td><div>{{{内容2}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目2style|}}}" class="{{{項目2class|}}}">{{{項目2|}}}</th><td class="infobox-data {{{内容2style|}}}" class="{{{内容2class|}}}"><div>{{{内容2}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容2}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容2style|}}}" class="{{{内容2class|}}}"><div>{{{内容2}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容3|}}} | {{#if: {{{項目3|}}} | }}{{#if: {{{内容3|}}} | {{#if: {{{項目3|}}} | ||
| <tr><th class="infobox-label">{{{項目3|}}}</th><td><div>{{{内容3}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目3style|}}}" class="{{{項目3class|}}}">{{{項目3|}}}</th><td class="infobox-data {{{内容3style|}}}" class="{{{内容3class|}}}"><div>{{{内容3}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容3}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容3style|}}}" class="{{{内容3class|}}}"><div>{{{内容3}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容4|}}} | {{#if: {{{項目4|}}} | }}{{#if: {{{内容4|}}} | {{#if: {{{項目4|}}} | ||
| <tr><th class="infobox-label">{{{項目4|}}}</th><td><div>{{{内容4}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目4style|}}}" class="{{{項目4class|}}}">{{{項目4|}}}</th><td class="infobox-data {{{内容4style|}}}" class="{{{内容4class|}}}"><div>{{{内容4}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容4}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容4style|}}}" class="{{{内容4class|}}}"><div>{{{内容4}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容5|}}} | {{#if: {{{項目5|}}} | }}{{#if: {{{内容5|}}} | {{#if: {{{項目5|}}} | ||
| <tr><th class="infobox-label">{{{項目5|}}}</th><td><div>{{{内容5}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目5style|}}}" class="{{{項目5class|}}}">{{{項目5|}}}</th><td class="infobox-data {{{内容5style|}}}" class="{{{内容5class|}}}"><div>{{{内容5}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容5}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容5style|}}}" class="{{{内容5class|}}}"><div>{{{内容5}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容6|}}} | {{#if: {{{項目6|}}} | }}{{#if: {{{内容6|}}} | {{#if: {{{項目6|}}} | ||
| <tr><th class="infobox-label">{{{項目6|}}}</th><td><div>{{{内容6}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目6style|}}}" class="{{{項目6class|}}}">{{{項目6|}}}</th><td class="infobox-data {{{内容6style|}}}" class="{{{内容6class|}}}"><div>{{{内容6}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容6}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容6style|}}}" class="{{{内容6class|}}}"><div>{{{内容6}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容7|}}} | {{#if: {{{項目7|}}} | }}{{#if: {{{内容7|}}} | {{#if: {{{項目7|}}} | ||
| <tr><th class="infobox-label">{{{項目7|}}}</th><td><div>{{{内容7}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目7style|}}}" class="{{{項目7class|}}}">{{{項目7|}}}</th><td class="infobox-data {{{内容7style|}}}" class="{{{内容7class|}}}"><div>{{{内容7}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容7}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容7style|}}}" class="{{{内容7class|}}}"><div>{{{内容7}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容8|}}} | {{#if: {{{項目8|}}} | }}{{#if: {{{内容8|}}} | {{#if: {{{項目8|}}} | ||
| <tr><th class="infobox-label">{{{項目8|}}}</th><td><div>{{{内容8}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目8style|}}}" class="{{{項目8class|}}}">{{{項目8|}}}</th><td class="infobox-data {{{内容8style|}}}" class="{{{内容8class|}}}"><div>{{{内容8}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容8}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容8style|}}}" class="{{{内容8class|}}}"><div>{{{内容8}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容9|}}} | {{#if: {{{項目9|}}} | }}{{#if: {{{内容9|}}} | {{#if: {{{項目9|}}} | ||
| <tr><th class="infobox-label">{{{項目9|}}}</th><td><div>{{{内容9}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目9style|}}}" class="{{{項目9class|}}}">{{{項目9|}}}</th><td class="infobox-data {{{内容9style|}}}" class="{{{内容9class|}}}"><div>{{{内容9}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容9}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容9style|}}}" class="{{{内容9class|}}}"><div>{{{内容9}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容10|}}} | {{#if: {{{項目10|}}} | }}{{#if: {{{内容10|}}} | {{#if: {{{項目10|}}} | ||
| <tr><th class="infobox-label">{{{項目10|}}}</th><td><div>{{{内容10}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目10style|}}}" class="{{{項目10class|}}}">{{{項目10|}}}</th><td class="infobox-data {{{内容10style|}}}" class="{{{内容10class|}}}"><div>{{{内容10}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容10}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容10style|}}}" class="{{{内容10class|}}}"><div>{{{内容10}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容11|}}} | {{#if: {{{項目11|}}} | }}{{#if: {{{内容11|}}} | {{#if: {{{項目11|}}} | ||
| <tr><th class="infobox-label">{{{項目11|}}}</th><td><div>{{{内容11}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目11style|}}}" class="{{{項目11class|}}}">{{{項目11|}}}</th><td class="infobox-data {{{内容11style|}}}" class="{{{内容11class|}}}"><div>{{{内容11}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容11}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容11style|}}}" class="{{{内容11class|}}}"><div>{{{内容11}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容12|}}} | {{#if: {{{項目12|}}} | }}{{#if: {{{内容12|}}} | {{#if: {{{項目12|}}} | ||
| <tr><th class="infobox-label">{{{項目12|}}}</th><td><div>{{{内容12}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目12style|}}}" class="{{{項目12class|}}}">{{{項目12|}}}</th><td class="infobox-data {{{内容12style|}}}" class="{{{内容12class|}}}"><div>{{{内容12}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容12}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容12style|}}}" class="{{{内容12class|}}}"><div>{{{内容12}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容13|}}} | {{#if: {{{項目13|}}} | }}{{#if: {{{内容13|}}} | {{#if: {{{項目13|}}} | ||
| <tr><th class="infobox-label">{{{項目13|}}}</th><td><div>{{{内容13}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目13style|}}}" class="{{{項目13class|}}}">{{{項目13|}}}</th><td class="infobox-data {{{内容13style|}}}" class="{{{内容13class|}}}"><div>{{{内容13}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容13}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容13style|}}}" class="{{{内容13class|}}}"><div>{{{内容13}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容14|}}} | {{#if: {{{項目14|}}} | }}{{#if: {{{内容14|}}} | {{#if: {{{項目14|}}} | ||
| <tr><th class="infobox-label">{{{項目14|}}}</th><td><div>{{{内容14}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目14style|}}}" class="{{{項目14class|}}}">{{{項目14|}}}</th><td class="infobox-data {{{内容14style|}}}" class="{{{内容14class|}}}"><div>{{{内容14}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容14}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容14style|}}}" class="{{{内容14class|}}}"><div>{{{内容14}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容15|}}} | {{#if: {{{項目15|}}} | }}{{#if: {{{内容15|}}} | {{#if: {{{項目15|}}} | ||
| <tr><th class="infobox-label">{{{項目15|}}}</th><td><div>{{{内容15}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目15style|}}}" class="{{{項目15class|}}}">{{{項目15|}}}</th><td class="infobox-data {{{内容15style|}}}" class="{{{内容15class|}}}"><div>{{{内容15}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容15}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容15style|}}}" class="{{{内容15class|}}}"><div>{{{内容15}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容16|}}} | {{#if: {{{項目16|}}} | }}{{#if: {{{内容16|}}} | {{#if: {{{項目16|}}} | ||
| <tr><th class="infobox-label">{{{項目16|}}}</th><td><div>{{{内容16}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目16style|}}}" class="{{{項目16class|}}}">{{{項目16|}}}</th><td class="infobox-data {{{内容16style|}}}" class="{{{内容16class|}}}"><div>{{{内容16}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容16}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容16style|}}}" class="{{{内容16class|}}}"><div>{{{内容16}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容17|}}} | {{#if: {{{項目17|}}} | }}{{#if: {{{内容17|}}} | {{#if: {{{項目17|}}} | ||
| <tr><th class="infobox-label">{{{項目17|}}}</th><td><div>{{{内容17}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目17style|}}}" class="{{{項目17class|}}}">{{{項目17|}}}</th><td class="infobox-data {{{内容17style|}}}" class="{{{内容17class|}}}"><div>{{{内容17}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容17}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容17style|}}}" class="{{{内容17class|}}}"><div>{{{内容17}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容18|}}} | {{#if: {{{項目18|}}} | }}{{#if: {{{内容18|}}} | {{#if: {{{項目18|}}} | ||
| <tr><th class="infobox-label">{{{項目18|}}}</th><td><div>{{{内容18}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目18style|}}}" class="{{{項目18class|}}}">{{{項目18|}}}</th><td class="infobox-data {{{内容18style|}}}" class="{{{内容18class|}}}"><div>{{{内容18}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容18}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容18style|}}}" class="{{{内容18class|}}}"><div>{{{内容18}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容19|}}} | {{#if: {{{項目19|}}} | }}{{#if: {{{内容19|}}} | {{#if: {{{項目19|}}} | ||
| <tr><th class="infobox-label">{{{項目19|}}}</th><td><div>{{{内容19}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目19style|}}}" class="{{{項目18class|}}}">{{{項目19|}}}</th><td class="infobox-data {{{内容19style|}}}" class="{{{内容19class|}}}"><div>{{{内容19}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容19}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容19style|}}}" class="{{{内容19class|}}}"><div>{{{内容19}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if: {{{内容20|}}} | {{#if: {{{項目20|}}} | }}{{#if: {{{内容20|}}} | {{#if: {{{項目20|}}} | ||
| <tr><th class="infobox-label">{{{項目20|}}}</th><td><div>{{{内容20}}}</div></td></tr> | | <tr><th class="infobox-label {{{項目20style|}}}" class="{{{項目20class|}}}">{{{項目20|}}}</th><td class="infobox-data {{{内容20style|}}}" class="{{{内容20class|}}}"><div>{{{内容20}}}</div></td></tr> | ||
| <tr><td colspan="2"><div>{{{内容20}}}</div></td></tr> | | <tr><td colspan="2" class="infobox-data {{{内容20style|}}}" class="{{{内容20class|}}}"><div>{{{内容20}}}</div></td></tr> | ||
}} | }} | ||
}}{{#if:{{{name|}}}|<tr class="infoboxLinks noprint"><td colspan=2 style="text-align:right; font-size:85%;">[[{{ns:10}}:{{{name}}}| | }}{{#if: {{{name|}}} | ||
</table></includeonly> | | <tr class="infoboxLinks noprint"><td colspan="2" style="text-align:right; font-size:85%;">[[{{ns:10}}:{{{name}}}|<span title="このテンプレートを表示します">表示</span>]]・[[{{ns:11}}:{{{name}}}|<span title="このテンプレートのノートを表示します">トーク</span>]]・[{{fullurl:{{ns:10}}:{{{name}}}|action=edit}} <span title="このテンプレートを編集します">編集</span>]・[{{fullurl:{{ns:10}}:{{{name}}}|action=history}} <span title="このテンプレートの過去の版を表示します">履歴</span>]</td></tr> | ||
}}</table></includeonly> |
2015年9月2日 (水) 16:37時点における版
このテンプレートは、情報ボックスを持つテンプレートを作成する際に使用するメタ・テンプレートです。
使い方
{{情報ボックス | name = | カテゴリ = | タイトル1 = | タイトル2 = ... | サブヘッダ = | 画像 = | 項目1 = | 内容1 = | 項目2 = | 内容2 = ... }}
引数
引数 | 指定内容 | 既定値 | 説明 |
---|---|---|---|
name | テンプレート名 | (なし) | この値にテンプレート名を指定すると、情報ボックスの最下部に「表示・トーク・編集・履歴」が表示されます。テンプレート名は、名前空間「テンプレート:」を省いて指定します。 |
カテゴリ | テキスト | (なし) | 指定した名前のカテゴリが生成されます。ソートキーは「sortkey」に指定した値が渡されます。 |
タイトル1 - タイトル10 |
テキスト | (なし) | タイトルに使用されるテキストです。最大10個を作成できます。 |
サブヘッダ | テキスト | (なし) | タイトル下に表示されるテキストです。 |
画像 | [[ファイル:example.jpg|250px]]
|
(なし) | 画像を指定します。 |
項目1 - 項目20 | テキスト | (なし) | 列のラベルを指定します。最大20個を作成できます。指定がない場合、ラベルなしの表示になります。 |
内容1 - 内容20 | テキスト | (なし) | 列の内容を指定します。最大20個を作成できます。指定がない場合、列は表示されません。 |
class | クラス属性 | (なし) | table要素に指定されるclass属性を指定します。「タイトル1class」「内容1class」などを指定することもできます。 |
style | スタイル属性 | (なし) | table要素に指定されるstyle属性を指定します。「タイトル1style」「内容1style」などを指定することもできます。 |
使用例
入力内容(編集) | 出力結果 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{情報ボックス | タイトル1 = タイトル1 | タイトル2 = タイトル2 | サブヘッダ = サブヘッダ | 画像 = | 項目1 = 項目1 | 内容1 = 内容1 | 項目2 = 項目2 | 内容2 = 内容2 | 内容3 = 内容3(「項目3」が未指定の場合の表示) | 内容4 = {{折り畳みボックス | タイトル = 折り畳みボックス | 項目1 = 項目1 | 内容1 = 折り畳みボックスの内容1 | 項目2 = 項目2 | 内容2 = 折り畳みボックスの内容2 }} }} |
|