Template:Infobox: Difference between revisions

    From Hokuto no Ken Encyclopedia | HnKWiki
    No edit summary
    No edit summary
     
    (7 intermediate revisions by one other user not shown)
    Line 1: Line 1:
    {| class="infobox" style="font-size:89%; width:300px;"
    <table class="infobox {{{bodyclass|}}}" style="font-size:89%; --infobox-width: 300px; {{{bodystyle|}}}"><!--
    |-
    Header
    ! class="color1" colspan="2" style="font-size:120%; padding:1em;" | {{{Box title|No Title}}}
    -->{{#if:{{{Box title|}}}|<tr><th colspan=2 class="{{{boxtitleclass|color1}}}" style="text-align:center; font-size:125%; font-weight:bold; {{{boxtitleestyle|}}}">{{{Box title}}}</th></tr>}}<!--
    {{#if: {{{image|}}}|
    Image
    {{!}}-
    -->{{#if: {{{image|}}}|<tr><td colspan="2" style="text-align:center;">{{{image}}}{{#if: {{{caption|}}}|<br/>''{{{caption}}}''}}</td></tr>
    {{!}} colspan="2" style="text-align:center;" {{!}} {{{image}}}{{#if: {{{caption|}}}|<br/>''{{{caption}}}''}}
    |
    |
    }}<!--
    -->{{Infobox/row|header={{{Row 1 header|}}}|label={{{Row 1 title|}}}|data={{{Row 1 info|}}}
    }}{{Infobox/row|header={{{Row 2 header|}}}|label={{{Row 2 title|}}}|data={{{Row 2 info|}}}
    }}{{Infobox/row|header={{{Row 3 header|}}}|label={{{Row 3 title|}}}|data={{{Row 3 info|}}}
    }}{{Infobox/row|header={{{Row 4 header|}}}|label={{{Row 4 title|}}}|data={{{Row 4 info|}}}
    }}{{Infobox/row|header={{{Row 5 header|}}}|label={{{Row 5 title|}}}|data={{{Row 5 info|}}}
    }}{{Infobox/row|header={{{Row 6 header|}}}|label={{{Row 6 title|}}}|data={{{Row 6 info|}}}
    }}{{Infobox/row|header={{{Row 7 header|}}}|label={{{Row 7 title|}}}|data={{{Row 7 info|}}}
    }}{{Infobox/row|header={{{Row 8 header|}}}|label={{{Row 8 title|}}}|data={{{Row 8 info|}}}
    }}{{Infobox/row|header={{{Row 9 header|}}}|label={{{Row 9 title|}}}|data={{{Row 9 info|}}}
    }}{{Infobox/row|header={{{Row 10 header|}}}|label={{{Row 10 title|}}}|data={{{Row 10 info|}}}
    }}{{Infobox/row|header={{{Row 11 header|}}}|label={{{Row 11 title|}}}|data={{{Row 11 info|}}}
    }}{{Infobox/row|header={{{Row 12 header|}}}|label={{{Row 12 title|}}}|data={{{Row 12 info|}}}
    }}{{Infobox/row|header={{{Row 13 header|}}}|label={{{Row 13 title|}}}|data={{{Row 13 info|}}}
    }}{{Infobox/row|header={{{Row 14 header|}}}|label={{{Row 14 title|}}}|data={{{Row 14 info|}}}
    }}{{Infobox/row|header={{{Row 15 header|}}}|label={{{Row 15 title|}}}|data={{{Row 15 info|}}}
    }}{{Infobox/row|header={{{Row 16 header|}}}|label={{{Row 16 title|}}}|data={{{Row 16 info|}}}
    }}{{Infobox/row|header={{{Row 17 header|}}}|label={{{Row 17 title|}}}|data={{{Row 17 info|}}}
    }}{{Infobox/row|header={{{Row 18 header|}}}|label={{{Row 18 title|}}}|data={{{Row 18 info|}}}
    }}{{Infobox/row|header={{{Row 19 header|}}}|label={{{Row 19 title|}}}|data={{{Row 19 info|}}}
    }}{{Infobox/row|header={{{Row 20 header|}}}|label={{{Row 20 title|}}}|data={{{Row 20 info|}}}
    }}{{Infobox/row|header={{{Row 21 header|}}}|label={{{Row 21 title|}}}|data={{{Row 21 info|}}}
    }}{{Infobox/row|header={{{Row 22 header|}}}|label={{{Row 22 title|}}}|data={{{Row 22 info|}}}
    }}{{Infobox/row|header={{{Row 23 header|}}}|label={{{Row 23 title|}}}|data={{{Row 23 info|}}}
    }}{{Infobox/row|header={{{Row 24 header|}}}|label={{{Row 24 title|}}}|data={{{Row 24 info|}}}
    }}{{Infobox/row|header={{{Row 25 header|}}}|label={{{Row 25 title|}}}|data={{{Row 25 info|}}}
    }}{{Infobox/row|header={{{Row 26 header|}}}|label={{{Row 26 title|}}}|data={{{Row 26 info|}}}
    }}{{Infobox/row|header={{{Row 27 header|}}}|label={{{Row 27 title|}}}|data={{{Row 27 info|}}}
    }}{{Infobox/row|header={{{Row 28 header|}}}|label={{{Row 28 title|}}}|data={{{Row 28 info|}}}
    }}{{Infobox/row|header={{{Row 29 header|}}}|label={{{Row 29 title|}}}|data={{{Row 29 info|}}}
    }}{{Infobox/row|header={{{Row 30 header|}}}|label={{{Row 30 title|}}}|data={{{Row 30 info|}}}
    }}{{Infobox/row|header={{{Row 31 header|}}}|label={{{Row 31 title|}}}|data={{{Row 31 info|}}}
    }}{{Infobox/row|header={{{Row 32 header|}}}|label={{{Row 32 title|}}}|data={{{Row 32 info|}}}
    }}{{Infobox/row|header={{{Row 33 header|}}}|label={{{Row 33 title|}}}|data={{{Row 33 info|}}}
    }}{{Infobox/row|header={{{Row 34 header|}}}|label={{{Row 34 title|}}}|data={{{Row 34 info|}}}
    }}{{Infobox/row|header={{{Row 35 header|}}}|label={{{Row 35 title|}}}|data={{{Row 35 info|}}}
    }}{{Infobox/row|header={{{Row 36 header|}}}|label={{{Row 36 title|}}}|data={{{Row 36 info|}}}
    }}{{Infobox/row|header={{{Row 37 header|}}}|label={{{Row 37 title|}}}|data={{{Row 37 info|}}}
    }}{{Infobox/row|header={{{Row 38 header|}}}|label={{{Row 38 title|}}}|data={{{Row 38 info|}}}
    }}{{Infobox/row|header={{{Row 39 header|}}}|label={{{Row 39 title|}}}|data={{{Row 39 info|}}}
    }}{{Infobox/row|header={{{Row 40 header|}}}|label={{{Row 40 title|}}}|data={{{Row 40 info|}}}
    }}{{Infobox/row|header={{{Row 41 header|}}}|label={{{Row 41 title|}}}|data={{{Row 41 info|}}}
    }}{{Infobox/row|header={{{Row 42 header|}}}|label={{{Row 42 title|}}}|data={{{Row 42 info|}}}
    }}{{Infobox/row|header={{{Row 43 header|}}}|label={{{Row 43 title|}}}|data={{{Row 43 info|}}}
    }}{{Infobox/row|header={{{Row 44 header|}}}|label={{{Row 44 title|}}}|data={{{Row 44 info|}}}
    }}{{Infobox/row|header={{{Row 45 header|}}}|label={{{Row 45 title|}}}|data={{{Row 45 info|}}}
    }}{{Infobox/row|header={{{Row 46 header|}}}|label={{{Row 46 title|}}}|data={{{Row 46 info|}}}
    }}{{Infobox/row|header={{{Row 47 header|}}}|label={{{Row 47 title|}}}|data={{{Row 47 info|}}}
    }}{{Infobox/row|header={{{Row 48 header|}}}|label={{{Row 48 title|}}}|data={{{Row 48 info|}}}
    }}{{Infobox/row|header={{{Row 49 header|}}}|label={{{Row 49 title|}}}|data={{{Row 49 info|}}}
    }}{{Infobox/row|header={{{Row 50 header|}}}|label={{{Row 50 title|}}}|data={{{Row 50 info|}}}
    }}{{Infobox/row|header={{{Row 51 header|}}}|label={{{Row 51 title|}}}|data={{{Row 51 info|}}}
    }}{{Infobox/row|header={{{Row 52 header|}}}|label={{{Row 52 title|}}}|data={{{Row 52 info|}}}
    }}{{Infobox/row|header={{{Row 53 header|}}}|label={{{Row 53 title|}}}|data={{{Row 53 info|}}}
    }}{{Infobox/row|header={{{Row 54 header|}}}|label={{{Row 54 title|}}}|data={{{Row 54 info|}}}
    }}{{Infobox/row|header={{{Row 55 header|}}}|label={{{Row 55 title|}}}|data={{{Row 55 info|}}}
    }}{{Infobox/row|header={{{Row 56 header|}}}|label={{{Row 56 title|}}}|data={{{Row 56 info|}}}
    }}{{Infobox/row|header={{{Row 57 header|}}}|label={{{Row 57 title|}}}|data={{{Row 57 info|}}}
    }}{{Infobox/row|header={{{Row 58 header|}}}|label={{{Row 58 title|}}}|data={{{Row 58 info|}}}
    }}{{Infobox/row|header={{{Row 59 header|}}}|label={{{Row 59 title|}}}|data={{{Row 59 info|}}}
    }}{{Infobox/row|header={{{Row 60 header|}}}|label={{{Row 60 title|}}}|data={{{Row 60 info|}}}
    }}{{Infobox/row|header={{{Row 61 header|}}}|label={{{Row 61 title|}}}|data={{{Row 61 info|}}}
    }}{{Infobox/row|header={{{Row 62 header|}}}|label={{{Row 62 title|}}}|data={{{Row 62 info|}}}
    }}{{Infobox/row|header={{{Row 63 header|}}}|label={{{Row 63 title|}}}|data={{{Row 63 info|}}}
    }}{{Infobox/row|header={{{Row 64 header|}}}|label={{{Row 64 title|}}}|data={{{Row 64 info|}}}
    }}{{Infobox/row|header={{{Row 65 header|}}}|label={{{Row 65 title|}}}|data={{{Row 65 info|}}}
    }}{{Infobox/row|header={{{Row 66 header|}}}|label={{{Row 66 title|}}}|data={{{Row 66 info|}}}
    }}{{Infobox/row|header={{{Row 67 header|}}}|label={{{Row 67 title|}}}|data={{{Row 67 info|}}}
    }}{{Infobox/row|header={{{Row 68 header|}}}|label={{{Row 68 title|}}}|data={{{Row 68 info|}}}
    }}{{Infobox/row|header={{{Row 69 header|}}}|label={{{Row 69 title|}}}|data={{{Row 69 info|}}}
    }}{{Infobox/row|header={{{Row 70 header|}}}|label={{{Row 70 title|}}}|data={{{Row 70 info|}}}
    }}{{Infobox/row|header={{{Row 71 header|}}}|label={{{Row 71 title|}}}|data={{{Row 71 info|}}}
    }}{{Infobox/row|header={{{Row 72 header|}}}|label={{{Row 72 title|}}}|data={{{Row 72 info|}}}
    }}{{Infobox/row|header={{{Row 73 header|}}}|label={{{Row 73 title|}}}|data={{{Row 73 info|}}}
    }}{{Infobox/row|header={{{Row 74 header|}}}|label={{{Row 74 title|}}}|data={{{Row 74 info|}}}
    }}{{Infobox/row|header={{{Row 75 header|}}}|label={{{Row 75 title|}}}|data={{{Row 75 info|}}}
    }}{{Infobox/row|header={{{Row 76 header|}}}|label={{{Row 76 title|}}}|data={{{Row 76 info|}}}
    }}{{Infobox/row|header={{{Row 77 header|}}}|label={{{Row 77 title|}}}|data={{{Row 77 info|}}}
    }}{{Infobox/row|header={{{Row 78 header|}}}|label={{{Row 78 title|}}}|data={{{Row 78 info|}}}
    }}{{Infobox/row|header={{{Row 79 header|}}}|label={{{Row 79 title|}}}|data={{{Row 79 info|}}}
    }}{{Infobox/row|header={{{Row 80 header|}}}|label={{{Row 80 title|}}}|data={{{Row 80 info|}}}
    }}
    }}
    {{#if: {{{Row 1 title|}}}{{{Row 1 info|}}}|
    </table><noinclude>{{documentation}}</noinclude>
    {{!}}-
    {{#if: {{{Row 1 title|}}}| TITLE IS THERE
    {{#if: {{{Row 1 info|}}}| CONTENT IS THERE
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 1 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 1 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 1 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 1 title}}}'''
    }}
    {{#if: {{{Row 2 title|}}}{{{Row 2 info|}}}|
    {{!}}-
    {{#if: {{{Row 2 title|}}}|
    {{#if: {{{Row 2 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 2 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 2 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 2 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 2 title}}}'''
    }}
    {{#if: {{{Row 3 title|}}}{{{Row 3 info|}}}|
    {{!}}-
    {{#if: {{{Row 3 title|}}}|
    {{#if: {{{Row 3 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 3 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 3 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 3 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 3 title}}}'''
    }}
    {{#if: {{{Row 4 title|}}}{{{Row 4 info|}}}|
    {{!}}-
    {{#if: {{{Row 4 title|}}}|
    {{#if: {{{Row 4 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 4 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 4 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 4 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 4 title}}}'''
    }}
    {{#if: {{{Row 5 title|}}}{{{Row 5 info|}}}|
    {{!}}-
    {{#if: {{{Row 5 title|}}}|
    {{#if: {{{Row 5 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 5 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 5 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 5 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 5 title}}}'''
    }}
    {{#if: {{{Row 6 title|}}}{{{Row 6 info|}}}|
    {{!}}-
    {{#if: {{{Row 6 title|}}}|
    {{#if: {{{Row 6 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 6 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 6 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 6 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 6 title}}}'''
    }}
    {{#if: {{{Row 7 title|}}}{{{Row 7 info|}}}|
    {{!}}-
    {{#if: {{{Row 7 title|}}}|
    {{#if: {{{Row 7 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 7 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 7 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 7 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 7 title}}}'''
    }}
    {{#if: {{{Row 8 title|}}}{{{Row 8 info|}}}|
    {{!}}-
    {{#if: {{{Row 8 title|}}}|
    {{#if: {{{Row 8 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 8 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 8 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 8 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 8 title}}}'''
    }}
    {{#if: {{{Row 9 title|}}}{{{Row 9 info|}}}|
    {{!}}-
    {{#if: {{{Row 9 title|}}}|
    {{#if: {{{Row 9 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 9 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 9 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 9 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 9 title}}}'''
    }}
    {{#if: {{{Row 10 title|}}}{{{Row 10 info|}}}|
    {{!}}-
    {{#if: {{{Row 10 title|}}}|
    {{#if: {{{Row 10 info|}}}|
    {{!}} style="width:30%;" class="color2" {{!}}'''{{{Row 10 title}}}'''
    {{!}} style="width:70%;" {{!}}{{{Row 10 info}}}
    |
    {{!}} colspan="2" style="text-align:center;" {{!}}{{{Row 10 info}}}
    }}
    |
    {{!}} colspan="2" style="text-align:center;" class="color1" {{!}}'''{{{Row 10 title}}}'''
    }}
    {{#if: {{{Row 11 title|}}}{{{Row 11 info|}}}|
    {{!}}-
    {{!}} colspan="2" style="text-align:center; background:#AAAAAA;" {{!}}
    '''Too many parameters'''
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |
    }}
    |}
    <noinclude>
    {{documentation}}</noinclude>

    Latest revision as of 20:13, 16 December 2023

    Template documentation (for the above template, sometimes hidden or invisible)
    This template is newer than a similar one on the Starter Pages Wikia. This template may therefore have bug fixes or improvements when compared to the older version.
    Description
    • This template produces an infobox-style template.
    • You may want to copy and modify this to create a specific infobox (e.g. character infobox).
    • This template requires parser functions to be enabled (Wikia default: on).
    Syntax
    {{Infobox
    |Box title    = 
    |image        = [[Image:Example.jpg|250px|Alternate text]]
    |caption      = Image caption
    |Row 1 title  =
    |Row 1 info   =
    |Row 2 title  =
    |Row 2 info   =
    |Row 3 title  =
    |Row 3 info   =
    |Row 4 title  =
    |Row 4 info   =
    |Row 5 title  =
    |Row 5 info   =
    |Row 6 title  =
    |Row 6 info   =
    |Row 7 title  =
    |Row 7 info   =
    |Row 8 title  =
    |Row 8 info   =
    |Row 9 title  =
    |Row 9 info   =
    |Row 10 title =
    |Row 10 info  =
    }}
    
    Notes
    • Keeping the Box Title empty will result in displaying No title
    • If you don't want to display image, just keep image empty.
    • No caption will be displayed unless there's an image also.
    • If you there is no value for both info and title of a given row, no rows past them will be displayed
    • Providing just the title or just the info will result in a row with a single cell.
      • Providing just the title will result in a section header specifically
    • Max row for information: 10 rows.
    Sample output
    Info Title
    A flower
    Just the info
    Both title And info

    Complete Infobox:
    {{Infobox
    |Box title = Info Title
    |image = [[Image:Example.jpg|120px|A flower]]
    |Row 1 title = Just the title
    |Row 1 info =
    |Row 2 title =
    |Row 2 info = Just the info
    |Row 3 title = Both the title
    |Row 3 info = And info
    }}


    Info Title
    Title row 1 Info row 1
    Title row 2 Info row 2
    Title row 3 Info row 3
    Title row 4 Info row 4
    Title row 5 Info row 5
    Title row 6 Info row 6
    Title row 7 Info row 7
    Title row 8 Info row 8
    Title row 9 Info row 9
    Title row 10 Info row 10

    Infobox Image omitted :
    {{Infobox
    |Box title = Info Title
    |Row 1 title = Title row 1
    |Row 1 info = Info row 1
    |Row 2 title = Title row 2
    |Row 2 info = Info row 2
    |Row 3 title = Title row 3
    |Row 3 info = Info row 3
    |Row 4 title = Title row 4
    |Row 4 info = Info row 4
    |Row 5 title = Title row 5
    |Row 5 info = Info row 5
    |Row 6 title = Title row 6
    |Row 6 info = Info row 6
    |Row 7 title = Title row 7
    |Row 7 info = Info row 7
    |Row 8 title = Title row 8
    |Row 8 info = Info row 8
    |Row 9 title = Title row 9
    |Row 9 info = Info row 9
    |Row 10 title = Title row 10
    |Row 10 info = Info row 10
    }}


    Info Title
    Title row 1 Info row 1
    Title row 2 Info row 2
    Title row 3 Info row 3

    Infobox Image omitted and displaying only 3 rows of information:
    {{Infobox
    |Box title = Info Title
    |Row 1 title = Title row 1
    |Row 1 info = Info row 1
    |Row 2 title = Title row 2
    |Row 2 info = Info row 2
    |Row 3 title = Title row 3
    |Row 3 info = Info row 3
    }}


    Info Title
    Title row 1 Info row 1
    Title row 2 Info row 2
    Title row 3 Info row 3
    Title row 5 Info row 5
    Title row 6 Info row 6

    Infobox Image and row 4 omited:
    Result: Row 4, 5, and 6 will not be displayed.
    {{Infobox
    |Box title = Info Title
    |Row 1 title = Title row 1
    |Row 1 info = Info row 1
    |Row 2 title = Title row 2
    |Row 2 info = Info row 2
    |Row 3 title = Title row 3
    |Row 3 info = Info row 3
    |Row 5 title = Title row 5
    |Row 5 info = Info row 5
    |Row 6 title = Title row 6
    |Row 6 info = Info row 6
    }}

    Visit Template:Infobox/doc to edit this text! (How does this work?)
    Done editing it? Refresh this page! (Why?)