Jump to content

Template:DialogueBox: Difference between revisions

From Cult of Flight Wiki
seeing those if functions in the template source codes made me feel like that one speed reading hieroglyphs gif
mNo edit summary
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly> {| {{#if: {{{content}}} | class="mw-customtoggle-{{{id}}}" | }} style="width: 500px;padding: 16px;border: 2px solid white;margin: 15px;text-align: justify;color: white; background-color: black;"  
<includeonly> <div class="content-box {{#if:{{{content|}}} | mw-customtoggle-{{{id}}} | }}" style="width: 500px; padding: 16px; border: 2px solid white; margin-top: 15px; text-align: justify; color: white; background-color: black;"> '''> {{{name|}}}''' <br> {{{line|}}}
|'''> {{{name}}}''' <br>
{{#if:{{{content|}}} | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{{id}}}" style="color:white;"> {{{content}}} </div> |}} {{#if: {{{content|}}} | <div style="display: block; text-align:right; position: relatiive;">✽</div> |}}
|-
</div> </includeonly>
|   {{{line|}}}
{| class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{{id}}}" style="color:white;padding: 1px;"
|{{{content|}}}
|}
|} </includeonly>


<noinclude>
<noinclude>
Line 15: Line 10:
|line=ExampleLine
|line=ExampleLine
|content=ExampleContent  
|content=ExampleContent  
|}
|}}
</pre>
</pre>



Latest revision as of 23:55, 12 April 2026


Example usage:

{{DialogueBox
|id=ExampleID
|name=ExampleName
|line=ExampleLine
|content=ExampleContent 
|}}

Note: the 'id' parameter is to ensure that the boxes won't open at the same time