Welcome to the Lylat Wiki, all about the Star Fox series! If you'd like to help out, please take a look at our community portal.

Difference between revisions of "Help:Infoboxes"

From Lylat Wiki, your source on Star Fox information. By Fans, for Fans.
Jump to navigationJump to search
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{shortcuts | Usage | {{LW:IB}} }}
{{shortcuts|LW:IB}}


 
Infoboxes are a place to store simple facts related to the article, and putting them in a small, compact table off to the side.  
 
Info boxes are a place to store simple facts related to the article, and putting them in a small, compact table off to the side.  


== Core of the infobox ==
== Core of the infobox ==
Our info box start off with 5 areas to be used, plus the ability to add more. For example:  
Our info box start off with 5 areas to be used, plus the ability to add more. For example:  
<pre>
<pre>
{{InfoBoxBegin v2.0
{{InfoboxBegin
| class = {{{class|}}} Fruit wikitable
| class = {{{cass|}}} Fruit  
| title = Fruits
| title = Fruits
| picture = {{{picture|}}}
| picture = {{{picture|}}}
| picture_size = {{{picture_size}}}
| image_size = {{{picture_size}}}
| caption = {{{caption|}}}  
| caption = {{{caption|}}}  
| colors = Wiki
| colors = Wiki
Line 27: Line 25:
| Info5details = {{{related_info|}}}
| Info5details = {{{related_info|}}}
}}
}}
{{InfoBoxEntry v2.0
{{!-}}
{{!}} {{InfoboxEntry
| colors = Wiki
| colors = Wiki
| InfoName = Pie?
| InfoName = Pie?
| InfoDetails = {{{pie}}}
| InfoDetails = {{{pie}}}
}}
}}
<!-- {{infoboxentry}} -->
<!-- {{InfoboxEntry}} -->
{{InfoBoxEnd v2.0
{{!-}}
| name = WkiInfoBox v2.0
{{!}} {{InfoboxEnd
| name = WikiInfobox
| colors = Wiki
| colors = Wiki
}}
}} {{tableend}}
</pre>
</pre>


comes out looking like:  
comes out looking like:  
{{InfoBoxBegin v2.0
{{InfoboxBegin
| class = {{{class|}}} Fruit wikitable
| class = {{{cass|}}} Fruit  
| title = Fruits
| title = Fruits
| picture = {{{picture|}}}
| picture = {{{picture|}}}
| picture_size = {{{picture_size}}}
| image_size = {{{picture_size}}}
| caption = {{{caption|}}}  
| caption = {{{caption|}}}  
| colors = Wiki
| colors = Wiki
Line 59: Line 59:
| Info5details = {{{related_info|}}}
| Info5details = {{{related_info|}}}
}}
}}
{{InfoBoxEntry v2.0
{{!-}}
{{!}} {{InfoboxEntry
| colors = Wiki
| colors = Wiki
| InfoName = Pie?
| InfoName = Pie?
| InfoDetails = {{{pie}}}
| InfoDetails = {{{pie}}}
}}
}}
<!-- {{infoboxentry}} -->
<!-- {{InfoboxEntry}} -->
{{InfoBoxEnd v2.0
{{!-}}
| name = WkiInfoBox v2.0
{{!}} {{InfoboxEnd
| name = WikiInfobox
| colors = Wiki
| colors = Wiki
}}
}} {{tableend}}


 
Each row in the table has 2 cells: Info#name and Info#details, where # is the row number. [[Template:InfoboxBegin]] has room for 5 rows, and [[Template:InfoboxEntry]] can dynamically add a row for each time it's used. [[Template:InfoboxBegin]] and [[Template:InfoboxEnd]] complete the box with all the needed info.  
Each row in the table has 2 cells: Info#name and Info#details, where # is the row number. [[Template:InfoBoxBegin v2.0]] has room for 5 rows, and [[Template:infoboxentry v2.0]] can dynamically add a row for each time it's used. [[Template:InfoBoxBegin v2.0]] and [[Template:InfoBoxEnd v2.0]] complete the box with all the needed info.  


== Parameters ==
== Parameters ==
when using a infobox within another template, like [[Template:VehicleInfobox v2.0]], you can specify the name of each row to something related to related usage of the template. In our example above, We are expecting this particular infobox to be used on Fruit related pages; therefore we told the template we are inheriting that we want the 5 fields to be called: Colors, Taste, Baked, Salted and "related info".  
when using a infobox within another template, like [[Template:Infobox vehicle]], you can specify the name of each row to something related to related usage of the template. In our example above, We are expecting this particular infobox to be used on Fruit related pages; therefore we told the template we are inheriting that we want the 5 fields to be called: Colors, Taste, Baked, Salted and "related info".  


Now, being we are using multiple layers of embedding templates, we want to make sure the end user's information is pass through our template and up to the core infobox template that actaully uses the infomation. This is where the parameters with a varible on the end come in handy. They look like <nowiki>| Info4details = {{{salted|}}}</nowiki> and if the end user specifies a value for "salted", we take it and pass it along as "Info4details". Neat, isn't it?
Now, being we are using multiple layers of embedding templates, we want to make sure the end user's information is pass through our template and up to the core infobox template that actually uses the information. This is where the parameters with a variable on the end come in handy. They look like <nowiki>| Info4details = {{{salted|}}}</nowiki> and if the end user specifies a value for "salted", we take it and pass it along as "Info4details". Neat, isn't it?


Lets take a look at another example.
Lets take a look at another example.
Line 84: Line 85:


<pre>
<pre>
{{InfoBoxBegin v2.0
{{InfoboxBegin
| class = {{{class|}}} Character color5  
| class = {{{cass|}}} Character color5  
| title = Characters
| title = Characters
| picture = {{{picture|}}}
| picture = {{{picture|}}}
| picture_size = {{{picture_size}}}
| image_size = {{{picture_size|}}}
| caption = {{{caption|}}}  
| caption = {{{caption|}}}  
| colors = Character  
| colors = Character
| style= {{{style|}}}
| style= {{{style|}}}
| teams = {{{teams}}}
| Info1name = name
| Info1name = name
| Info1details = {{{name}}} ({{{jname}}})
| Info1details = {{{name}}} {{#if:{{{jname|}}}|({{{jname|}}})}}
| Info2name = [[home planet]]
| Info2name = [[home planet]]
| Info2details = {{{home_planet|}}}
| Info2details = {{{home_planet|}}}
Line 104: Line 106:
}}
}}
{{!-}}
{{!-}}
{{#if: {{{alias|}}} |  
{{!}} {{#if: {{{alias|}}} |  
{{InfoBoxEntry v2.0
{{InfoboxEntry
| colors = Character
| colors = Character
| InfoName = Alais
| InfoName = Alais
Line 111: Line 113:
}}
}}
| }}
| }}
{{InfoBoxEnd
{{!-}}
| name = CharacterInfoBox v2.0
{{!}} {{InfoboxEntry
| colors = Character
| colors = Character
}}<includeonly>[[Category:{{{name}}}| ]]</includeonly><noinclude>
| InfoName = Teams
| InfoDetails = {{{teams}}}
}}
{{!-}}
{{!}} {{InfoboxEnd
| name = Infobox character
| colors = Character
}}{{tableend}}<includeonly>[[Category:{{{name}}}| ]]</includeonly><noinclude>


{{doc}}{{auto-cat2|InfoBox Usage Templates|Character Templates}}</noinclude>


</pre>
 
 
 
 
 
 
 
 
 
 
 
 
{{doc}}{{auto-cat2|Infobox Usage Templates|Character Templates}}</noinclude>
and came out like this  
and came out like this  
{{InfoBoxBegin v2.0
{{InfoboxBegin
| class = {{{class|}}} Character color5  
| class = {{{cass|}}} Character color5  
| title = Characters
| title = Characters
| picture = {{{picture|}}}
| picture = {{{picture|}}}
| picture_size = {{{picture_size}}}
| image_size = {{{picture_size|}}}
| caption = {{{caption|}}}  
| caption = {{{caption|}}}  
| colors = Character  
| colors = Character
| style= {{{style|}}}
| style= {{{style|}}}
| teams = {{{teams}}}
| Info1name = name
| Info1name = name
| Info1details = {{{name}}} ({{{jname}}})
| Info1details = {{{name}}} {{#if:{{{jname|}}}|({{{jname|}}})}}
| Info2name = [[home planet]]
| Info2name = [[home planet]]
| Info2details = {{{home_planet|}}}
| Info2details = {{{home_planet|}}}
Line 140: Line 161:
}}
}}
{{!-}}
{{!-}}
{{#if: {{{alias|}}} |  
{{!}} {{#if: {{{alias|}}} |  
{{InfoBoxEntry v2.0
{{InfoboxEntry
| colors = Character
| colors = Character
| InfoName = Alais
| InfoName = Alais
Line 147: Line 168:
}}
}}
| }}
| }}
{{InfoBoxEnd
{{!-}}
| name = CharacterInfoBox v2.0
{{!}} {{InfoboxEntry
| colors = Character
| colors = Character
| InfoName = Teams
| InfoDetails = {{{teams}}}
}}
}}
{{!-}}
{{!}} {{InfoboxEnd
| name = Infobox character
| colors = Character
}}{{tableend}}




 
Becuase of the way we set up parameters, a user of the characterinfobox only needs to place this in the article:
Becuase of the way we set up parameters, a user of the characterinfobox only needs to place this in the artilce:


<pre>
<pre>
{{CharacterInfoBox v2.0
{{Infobox character
| name =
| picture =  
| picture =  
| caption =  
| caption =  
| home_planet =
| name =
| role =
| home_planet =  
| role =  
| premier_game =  
| premier_game =  
| affiliations =  
| affiliations =  
| teams =
}}
}}
</pre>
</pre>


== Other info boxes ==
== Other info boxes ==
{{InfoBox Templates}}
{{Main|Lylat Wiki:Templates#Infobox templates}}




{{quote
:{{quote
| name = [[Peppy Hare]]
| name = Peppy Hare
| line = "Never give up. Trust your instincts. "  
| line = "Never give up. Trust your instincts. "  
| game = ''[[Star Fox 64]]''
| game = Star Fox 64
| ref = <ref>http://www.imdb.com/title/tt0241985/quotes</ref>
| ref = }}<ref>http://www.imdb.com/title/tt0241985/quotes</ref>
}}


== References ==
== References ==
<references />
<references />

Latest revision as of 22:09, 7 April 2020

Shortcut: LW:IB

Infoboxes are a place to store simple facts related to the article, and putting them in a small, compact table off to the side.

Core of the infobox

Our info box start off with 5 areas to be used, plus the ability to add more. For example:

{{InfoboxBegin 
| class = {{{cass|}}} Fruit 
| title = Fruits
| picture = {{{picture|}}}
| image_size = {{{picture_size}}}
| caption = {{{caption|}}} 
| colors = Wiki
| style= {{{style|}}}  
| Info1name = Colors
| Info1details = {{{colors|}}}
| Info2name = Taste 
| Info2details = {{{taste|}}}
| Info3name = Baked
| Info3details = {{{baked|}}}
| Info4name = Salted
| Info4details = {{{salted|}}}
| Info5name = [[related info]]
| Info5details = {{{related_info|}}}
}}
{{!-}}
{{!}} {{InfoboxEntry
| colors = Wiki
| InfoName = Pie?
| InfoDetails = {{{pie}}}
}}
<!-- {{InfoboxEntry}} -->
{{!-}}
{{!}} {{InfoboxEnd 
| name = WikiInfobox 
| colors = Wiki
}} {{tableend}}

comes out looking like:

Wiki: Fruits
Needed.png
Have an image of this Wiki? Why not upload it?
Details
Colors
Taste
Baked
Salted
related info
Pie? {{{pie}}}
 This box: view  talk  edit 
|}

Each row in the table has 2 cells: Info#name and Info#details, where # is the row number. Template:InfoboxBegin has room for 5 rows, and Template:InfoboxEntry can dynamically add a row for each time it's used. Template:InfoboxBegin and Template:InfoboxEnd complete the box with all the needed info.

Parameters

when using a infobox within another template, like Template:Infobox vehicle, you can specify the name of each row to something related to related usage of the template. In our example above, We are expecting this particular infobox to be used on Fruit related pages; therefore we told the template we are inheriting that we want the 5 fields to be called: Colors, Taste, Baked, Salted and "related info".

Now, being we are using multiple layers of embedding templates, we want to make sure the end user's information is pass through our template and up to the core infobox template that actually uses the information. This is where the parameters with a variable on the end come in handy. They look like | Info4details = {{{salted|}}} and if the end user specifies a value for "salted", we take it and pass it along as "Info4details". Neat, isn't it?

Lets take a look at another example.

CharacterInfobox template

at the time of this writing, CharacterInfobox looked like this:

{{InfoboxBegin 
| class = {{{cass|}}} Character color5 
| title = Characters
| picture = {{{picture|}}}
| image_size = {{{picture_size|}}}
| caption = {{{caption|}}} 
| colors = Character
| style= {{{style|}}}
| teams = {{{teams}}}
| Info1name = name
| Info1details = {{{name}}} {{#if:{{{jname|}}}|({{{jname|}}})}}
| Info2name = [[home planet]]
| Info2details = {{{home_planet|}}}
| Info3name = [[role]]
| Info3details = {{{role|}}}
| Info4name = [[premier game]]
| Info4details = {{{premier_game|}}}
| Info5name = [[affiliations (in-universe) |affiliations]]
| Info5details = {{{affiliations|}}}
}}
{{!-}}
{{!}} {{#if: {{{alias|}}} | 
{{InfoboxEntry
| colors = Character
| InfoName = Alais
| InfoDetails = {{{alias}}}
}}
| }}
{{!-}}
{{!}} {{InfoboxEntry
| colors = Character
| InfoName = Teams
| InfoDetails = {{{teams}}}
}}
{{!-}}
{{!}} {{InfoboxEnd 
| name = Infobox character 
| colors = Character
}}{{tableend}}<includeonly>[[Category:{{{name}}}| ]]</includeonly><noinclude>














{{doc}}{{auto-cat2|Infobox Usage Templates|Character Templates}}</noinclude>
and came out like this 
{{InfoboxBegin 
| class = {{{cass|}}} Character color5 
| title = Characters
| picture = {{{picture|}}}
| image_size = {{{picture_size|}}}
| caption = {{{caption|}}} 
| colors = Character
| style= {{{style|}}}
| teams = {{{teams}}}
| Info1name = name
| Info1details = {{{name}}} {{#if:{{{jname|}}}|({{{jname|}}})}}
| Info2name = [[home planet]]
| Info2details = {{{home_planet|}}}
| Info3name = [[role]]
| Info3details = {{{role|}}}
| Info4name = [[premier game]]
| Info4details = {{{premier_game|}}}
| Info5name = [[affiliations (in-universe) |affiliations]]
| Info5details = {{{affiliations|}}}
}}
{{!-}}
{{!}} {{#if: {{{alias|}}} | 
{{InfoboxEntry
| colors = Character
| InfoName = Alais
| InfoDetails = {{{alias}}}
}}
| }}
{{!-}}
{{!}} {{InfoboxEntry
| colors = Character
| InfoName = Teams
| InfoDetails = {{{teams}}}
}}
{{!-}}
{{!}} {{InfoboxEnd 
| name = Infobox character 
| colors = Character
}}{{tableend}}


Becuase of the way we set up parameters, a user of the characterinfobox only needs to place this in the article:

<pre>
{{Infobox character 
| picture = 
| caption = 
| name = 
| home_planet = 
| role = 
| premier_game = 
| affiliations = 
| teams = 
}}

Other info boxes

Main article: Lylat Wiki:Templates#Infobox templates


"{{{1}}}"
— {{{2}}}

[1]

References