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
(Created page with '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. Our info box start off with 5 areas to be used…')
 
Line 2: Line 2:




Our info box start off with 5 areas to be used, plus the ability to add more. For examples:  
Our info box start off with 5 areas to be used, plus the ability to add more. For example:  
 
 
<pre>
<pre>
{{InfoBoxBegin | class = {{{class|}}} Fruit | caption = Fruit | style= {{{style|}}} }}  
{{InfoBoxBegin | class = {{{class|}}} Fruit | caption = Fruit | style= {{{style|}}} }}  
Line 48: Line 46:


== Parameters ==
== Parameters ==
when using a infobox within another template, like [[Template:VehicleInfobox]], 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?


when using a infobox,
Lets take a look at another example.

Revision as of 21:44, 28 February 2010

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.


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

{{InfoBoxBegin | class = {{{class|}}} Fruit | caption = Fruit | style= {{{style|}}} }} 
{{!-}}
! colspan=2 {{!}} Details
{{InfoBox
| Info1name = Colors
| Info1details = {{{colors|}}}
| Info2name = Taste 
| Info2details = {{{taste|}}}
| Info3name = Baked
| Info3details = {{{baked|}}}
| Info4name = Salted
| Info4details = {{{salted|}}}
| Info5name = [[related info]]
| Info5details = {{{related_info|}}}
}}
<!-- {{infoboxentry}} -->
{{InfoBoxEnd}}

comes out looking like: Template:InfoBoxBegin |-
! colspan=2 | Details Template:InfoBoxDetails Template:InfoBoxEnd


Each row in the table has 2 cells: Info#name and Info#details, where # is the row #. Template:InfoBoxDetails 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:VehicleInfobox, 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 | 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.