Template:Template demo: Difference between revisions
Jump to navigation
Jump to search
(test) |
(No difference)
|
Revision as of 03:30, 10 July 2024
This is an attempt at making a template that produces a table of template usage examples for template documentation. This would replace manually written tables like Template:CharLink#Examples which involve copy-pasting the code for the template in both columns (which can easily get out of sync).
In the first column, the template parameters are not expanded at all before adding the nowiki tags. In the second column, the template is completely expanded before adding the nowiki tags. Is there a way to truncate template expansion so that it stops after two steps at {{CharLink|Shadowheart}}?
Code1 | Code2 | Result
|
---|---|---|
{{{ {{#var: i }} }}}
|
<span class="bg3wiki-char-link-icon" style="display: inline-block; vertical-align: middle; border: hidden; border-radius:50%; overflow: hidden; width: 25px; height: 25px">[[File:Portrait Shadowheart.png|link=Shadowheart|x25px|alt=Shadowheart|class=bg3wiki-icon ]]<span class="bg3wiki-after-icon"></span></span> [[Shadowheart|Shadowheart]]
|
Shadowheart |
{{{ {{#var: i }} }}}
|
<span class="bg3wiki-char-link-icon" style="display: inline-block; vertical-align: middle; border: hidden; border-radius:50%; overflow: hidden; width: 25px; height: 25px">[[File:Portrait Shadowheart.png|link=Shadowheart|x25px|alt=Shadowheart|class=bg3wiki-icon ]]<span class="bg3wiki-after-icon"></span></span> [[Shadowheart|Shart]]
|
Shart |