Ad placeholder

Template:Template demo: Difference between revisions

Jump to navigation Jump to search
Added (incomplete) support for example captions
m (Updated documentation)
(Added (incomplete) support for example captions)
Line 12: Line 12:
| list = {{#while:
| list = {{#while:
| {{{{{#var: i }} |}}}
| {{{{{#var: i }} |}}}
| <div class="bg3wiki-tooltip-box>'''Markup'''{{Demo|sep='''Renders as<br>'''|nocat=yes|style=margin-top:0px;|tag=pre|{{trim|{{{ {{#var: i}} }}}}}}}</div>
| <div class="bg3wiki-tooltip-box>{{#if:{{{caption {{#var: i}}|}}}|{{{caption {{#var: i}}|}}}<br>}}'''Markup'''{{Demo|sep='''Renders as<br>'''|nocat=yes|style=margin-top:0px;|tag=pre|{{trim|{{{ {{#var: i}} }}}}}}}</div>
{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}
{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}
}}
}}
Line 85: Line 85:
}}
}}
</nowiki>
</nowiki>
| caption 2 = You can optionally add additional context or information to examples with {{c|caption <number>}} parameters.
| <nowiki>
| <nowiki>
{{Quote fancy
{{Quote fancy
Line 122: Line 123:
             "example": "<nowiki>{{SAI|Fire Bolt}}</nowiki>",
             "example": "<nowiki>{{SAI|Fire Bolt}}</nowiki>",
             "type": "content",
             "type": "content",
"required": false
},
        "caption 1": {
"label": "Example 1 caption",
"description": "An additional caption or title for the example if you want to add additional context. Currently, only the list style format supports captions.",
            "example": "This example demos the {{c|style}} optional parameter.",
            "type": "string",
"required": false
},
        "caption 2": {
"label": "Example 2 caption",
"description": "An additional caption or title for the example if you want to add additional context. Currently, only the list style format supports captions.",
            "example": "This example demos the {{c|style}} optional parameter.",
            "type": "string",
"required": false
},
        "caption 3": {
"label": "And so on...",
"description": "An additional caption or title for the example if you want to add additional context. Currently, only the list style format supports captions.",
            "example": "This example demos the {{c|style}} optional parameter.",
            "type": "string",
"required": false
"required": false
},
},

Navigation menu