「テンプレート:Infobox/doc」の版間の差分

提供:関南・東山地方Wiki
ナビゲーションに移動 検索に移動
template>新幹線
template>新幹線
(+カテゴリ、言語間リンク)
140行目: 140行目:
|below=
|below=
}}
}}
</pre>
</pre><includeonly>
 
<!--カテゴリは以下に追加してください-->
[[Category:メタテンプレート|{{PAGENAME}}]]
 
<!--言語間リンクは以下に追加してください-->
[[en:Template:Infobox]]
[[ar:قالب:قالب معلومات]]
[[fa:الگو:دادان]]
[[fr:Modèle:Infobox]]
[[sl:Predloga:Infopolje]]
[[zh:Template:Infobox]]
[[ia:Patrono:Infobox]]
</includeonly>

2008年3月5日 (水) 18:06時点における版

使い方

このテンプレートはメタテンプレート(他のテンプレートを作成するときに使われるテンプレート)として使われることを想定しています。記事に使われることを想定していません。

使い方は{{Navbox}}に似ていますが、追加された機能があります。Each row on the table can either be a "header", or it can have a label/data pair, or it can just be a data cell. These are mutually exclusive states so if you define a row to be both a header and a label/data pair, the label/data pair is overridden.

Note that if you want to insert an image elsewhere other than the top of the infobox, or insert other "freeform" data, using a row with just a "data" field allows for that sort of thing.

パラメータ

必須

tnavbar (またはname)
表の最下部の{{Tnavbar}}を表示するために必要なテンプレート名です。{{subst:PAGENAME}}を使うことができます。
title
表の最上部に入れるテキストです。

オプション

titletype
captionと入力したときだけタイトルがキャプションになります。それ以外の値が入力されると見出しセル (th) になります。
bordered
yesと入力したときだけ表全体に罫線が引かれます。空白か、それ以外の値が入力されると外枠以外の罫線は表示されません。
image
テンプレートの上部に表示される画像です。[[Image:example.png|200px]]のような、完全な画像構文を使ってください。デフォルトで中央に表示されます。
caption
画像の下に置くテキストです。
header(n)
列nのヘッダとして使うテキストです。
label(n)
列nのレーベルとして使うテキストです。
data(n)
列nのデータとして表示されるテキストです。
above
画像の下、列1の上に置くテキストです。
below
最下行に置くテキストです。脚注、関連項目、その他の情報として使われることを想定しています。

オプションCSSスタイル

bodystyle
Infobox全体のスタイル指定です。
titlestyle
タイトルセルだけのスタイル指定です。
imagestyle
画像があるセル(captionも含む)のスタイル指定です。
captionstyle
captionのテキストのスタイル指定です。
headerstyle
全てのヘッダセルのスタイル指定です。
labelstyle
全てのレーベルセルのスタイル指定です。
datastyle
全てのデータセルのスタイル指定です。
abovestyle
画像の下、列1の上のセルだけのスタイル指定です。
belowstyle
最下行のセルだけのスタイル指定です。

ソース

(Note: the template currently handles up to 40 rows, only 20 are included here since infoboxes larger than that will be relatively rare. Just extend the numbering as needed.)

{{Infobox
|tnavbar={{subst:PAGENAME}}
|bodystyle=
|titlestyle=
|imagestyle=
|captionstyle=
|headerstyle=
|labelstyle=
|datastyle=
|belowstyle=

|title=

|image=
|caption=

|header1=
|label1=
|data1=

|header2=
|label2=
|data2=

|header3=
|label3=
|data3=

|header4=
|label4=
|data4=

|header5=
|label5=
|data5=

|header6=
|label6=
|data6=

|header7=
|label7=
|data7=

|header8=
|label8=
|data8=

|header9=
|label9=
|data9=

|header10=
|label10=
|data10=

|header11=
|label11=
|data11=

|header12=
|label12=
|data12=

|header13=
|label13=
|data13=

|header14=
|label14=
|data14=

|header15=
|label15=
|data15=

|header16=
|label16=
|data16=

|header17=
|label17=
|data17=

|header18=
|label18=
|data18=

|header19=
|label19=
|data19=

|header20=
|label20=
|data20=

|below=
}}