Difference between revisions of "Template:Infobox advanced"

From TheHolo.Net Forums Wiki

Jump to:navigation, search
Line 70: Line 70:
 
}}
 
}}
 
|}<noinclude><br style="clear:both;"/>{{documentation}}</noinclude>
 
|}<noinclude><br style="clear:both;"/>{{documentation}}</noinclude>
 
{{SPW|is not on|name=Infobox advanced}}
 
==Description==
 
*This template produces a [[Help:Infobox|infobox]]-style template, without parameters being lost if a title is left out. It also has easier-to-use names.
 
*You may want to copy and modify this to create a specific infobox (e.g. character infobox).
 
 
==Dependencies==
 
*This template requires an "infobox" CSS element, and a {{t|!}} template, both of which are also required by the original.
 
*This template requires [[Help:Parser functions|parser functions]] to be enabled (Wikia default: on).
 
 
==Syntax==
 
<pre>
 
{{Infobox advanced
 
|title      =
 
|image      = [optional]
 
|imagewidth  = [defaults to 250]
 
|caption    = [optional]
 
|T1          =
 
|C1          =
 
|T2          = [optional]
 
|C2          = [optional]
 
|T3          = [optional]
 
|C3          = [optional]
 
|T4          = [optional]
 
|C4          = [optional]
 
|T5          = [optional]
 
|C5          = [optional]
 
|T6          = [optional]
 
|C6          = [optional]
 
|T7          = [optional]
 
|C7          = [optional]
 
|T8          = [optional]
 
|C8          = [optional]
 
|T9          = [optional]
 
|C9          = [optional]
 
|T10        = [optional]
 
|C10        = [optional]
 
}}
 
</pre>
 
 
===Notes===
 
* Keeping the '''title''' empty will result in displaying '''No title'''
 
* If you don't want to display image, just keep '''image''' and '''imagewidth''' empty.
 
* Keeping the '''T1''' empty will result in displaying '''No title'''.
 
* Keeping any '''C_''' parameter empty will result in displaying '''No information'''.
 
* Keeping the '''Row (any below row 1) title''' empty will result in that row not being displayed.
 
* Max rows for information: 10.
 
 
==Sample output==
 
{{Infobox advanced
 
|Box title  = Info Title
 
|image      = Image:Example.jpg
 
|imagewidth  = 120
 
|caption    = A flower
 
|T1          = Title row 1
 
|C1          = Info row 1
 
|T2          = Title row 2
 
|C2          = Info row 2
 
|T3          = Title row 3
 
|C3          = Info row 3
 
|T4          = Title row 4
 
|C4          = Info row 4
 
|T5          = Title row 5
 
|C5          = Info row 5
 
|T6          = Title row 6
 
|C6          = Info row 6
 
|T7          = Title row 7
 
|C7          = Info row 7
 
|T8          = Title row 8
 
|C8          = Info row 8
 
|T9          = Title row 9
 
|C9          = Info row 9
 
|T10        = Title row 10
 
|C10        = Info row 10
 
}}
 
Complete Infobox:<br />
 
<code>
 
'''<nowiki>{{</nowiki>Infobox advanced'''<br />
 
'''|'''Box title  = Info Title<br />
 
'''|'''image      = Image:Example.jpg<br />
 
'''|'''imagewidth  = 120<br />
 
'''|'''caption    = A flower<br />
 
'''|'''T1          = Title row 1<br />
 
'''|'''C1          = Info row 1<br />
 
'''|'''T2          = Title row 2<br />
 
'''|'''C2          = Info row 2<br />
 
'''|'''T3          = Title row 3<br />
 
'''|'''C3          = Info row 3<br />
 
'''|'''T4          = Title row 4<br />
 
'''|'''C4          = Info row 4<br />
 
'''|'''T5          = Title row 5<br />
 
'''|'''C5          = Info row 5<br />
 
'''|'''T6          = Title row 6<br />
 
'''|'''C6          = Info row 6<br />
 
'''|'''T7          = Title row 7<br />
 
'''|'''C7          = Info row 7<br />
 
'''|'''T8          = Title row 8<br />
 
'''|'''C8          = Info row 8<br />
 
'''|'''T9          = Title row 9<br />
 
'''|'''C9          = Info row 9<br />
 
'''|'''T10        = Title row 10<br />
 
'''|'''C10        = Info row 10<br />
 
'''<nowiki>}}</nowiki>'''
 
</code>
 
 
<br style="clear:both; margin-bottom:3em;"/>
 
 
{{Infobox advanced
 
|Box title  = Info Title
 
|T1          = Title row 1
 
|C1          = Info row 1
 
|T2          = Title row 2
 
|C2          = Info row 2
 
|T3          = Title row 3
 
|C3          = Info row 3
 
|T4          = Title row 4
 
|C4          = Info row 4
 
|T5          = Title row 5
 
|C5          = Info row 5
 
|T6          = Title row 6
 
|C6          = Info row 6
 
|T7          = Title row 7
 
|C7          = Info row 7
 
|T8          = Title row 8
 
|C8          = Info row 8
 
|T9          = Title row 9
 
|C9          = Info row 9
 
|T10        = Title row 10
 
|C10        = Info row 10
 
}}
 
Infobox '''Image''' omitted :<br />
 
<code>
 
'''<nowiki>{{</nowiki>Infobox advanced'''<br />
 
'''|'''Box title  = Info Title<br />
 
'''|'''T1          = Title row 1<br />
 
'''|'''C1          = Info row 1<br />
 
'''|'''T2          = Title row 2<br />
 
'''|'''C2          = Info row 2<br />
 
'''|'''T3          = Title row 3<br />
 
'''|'''C3          = Info row 3<br />
 
'''|'''T4          = Title row 4<br />
 
'''|'''C4          = Info row 4<br />
 
'''|'''T5          = Title row 5<br />
 
'''|'''C5          = Info row 5<br />
 
'''|'''T6          = Title row 6<br />
 
'''|'''C6          = Info row 6<br />
 
'''|'''T7          = Title row 7<br />
 
'''|'''C7          = Info row 7<br />
 
'''|'''T8          = Title row 8<br />
 
'''|'''C8          = Info row 8<br />
 
'''|'''T9          = Title row 9<br />
 
'''|'''C9          = Info row 9<br />
 
'''|'''T10        = Title row 10<br />
 
'''|'''C10        = Info row 10<br />
 
'''<nowiki>}}</nowiki>'''
 
</code>
 
 
<br style="clear:both; margin-bottom:3em;"/>
 
 
{{Infobox advanced
 
|Box title  = Info Title
 
|T1        = Title row 1
 
|C1        = Info row 1
 
|T2        = Title row 2
 
|C2        = Info row 2
 
|T3        = Title row 3
 
|C3        = Info row 3
 
}}
 
Infobox '''Image''' omitted and displaying only 3 rows of information:<br />
 
<code>
 
'''<nowiki>{{</nowiki>Infobox advanced'''<br />
 
'''|'''Box title  = Info Title<br />
 
'''|'''T1        = Title row 1<br />
 
'''|'''C1        = Info row 1<br />
 
'''|'''T2        = Title row 2<br />
 
'''|'''C2        = Info row 2<br />
 
'''|'''T3        = Title row 3<br />
 
'''|'''C3        = Info row 3<br />
 
'''<nowiki>}}</nowiki>'''
 
</code>
 
 
<br style="clear:both; margin-bottom:3em;"/>
 
 
{{Infobox advanced
 
|Box title  = Info Title
 
|T1        = Title row 1
 
|C1        = Info row 1
 
|T2        = Title row 2
 
|C2        = Info row 2
 
|T3        = Title row 3
 
|C3        = Info row 3
 
|C4        = Info row 4
 
|T5        = Title row 5
 
|C5        = Info row 5
 
|T6        = Title row 6
 
|C6        = Info row 6
 
}}
 
Infobox '''Image''' and '''title row 4''' omited:<br />
 
Result: Row 4 will not be displayed.<br />
 
<code>
 
'''<nowiki>{{</nowiki>Infobox advanced'''<br />
 
'''|'''Box title  = Info Title<br />
 
'''|'''T1        = Title row 1<br />
 
'''|'''C1        = Info row 1<br />
 
'''|'''T2        = Title row 2<br />
 
'''|'''C2        = Info row 2<br />
 
'''|'''T3        = Title row 3<br />
 
'''|'''C3        = Info row 3<br />
 
'''|'''C4        = Info row 4<br />
 
'''|'''T5        = Title row 5<br />
 
'''|'''C5        = Info row 5<br />
 
'''|'''T6        = Title row 6<br />
 
'''|'''C6        = Info row 6<br />
 
'''<nowiki>}}</nowiki>'''
 
</code>
 

Revision as of 17:00, 13 April 2011

No Title

{{#if: |

[[{{{image}}}|250px]]
'

}}

No Title No information{{#if: |
{{{T2}}} No information

}}{{#if: |

{{{T3}}} No information

}}{{#if: |

{{{T4}}} No information

}}{{#if: |

{{{T5}}} No information

}}{{#if: |

{{{T6}}} No information

}}{{#if: |

{{{T7}}} No information

}}{{#if: |

{{{T8}}} No information

}}{{#if: |

{{{T9}}} No information

}}{{#if: |

{{{T10}}} No information

}}{{#if: |

{{{T11}}} No information

}}{{#if: |

{{{T12}}} No information

}}{{#if: |

{{{T13}}} No information

}}{{#if: |

{{{T14}}} No information

}}{{#if: |

{{{T15}}} No information

}}{{#if: |

{{{T16}}} No information

}}{{#if: |

{{{T17}}} No information

}}{{#if: |

{{{T18}}} No information

}}{{#if: |

{{{T19}}} No information

}}{{#if: |

{{{T20}}} No information

}}{{#if: |

{{{T21}}} No information

}}


Template:Documentation