Difference between revisions of "Template:Code"
From Roll20 Wiki
Andreas J. (Talk | contribs) (create shorthand to more easily write code on the wiki) |
Andreas J. (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#if: {{{3|}}} ||<code style="margin:0" | + | <includeonly>{{#if: {{{3|}}} ||<code style="margin:0">{{{1}}}</code>}}{{#if: {{{2|}}} | <br>}}</includeonly> |
<noinclude> | <noinclude> | ||
Line 7: | Line 7: | ||
'''Example:''' | '''Example:''' | ||
− | {{code|/ | + | {{code|/r d20+4}} |
<pre> | <pre> | ||
− | {{code|/ | + | {{code|/r d20+4}} |
</pre> | </pre> | ||
</noinclude> | </noinclude> |
Revision as of 22:39, 4 May 2020
Shorthand to more easily write code on the wiki. {{c}}
is a shorter version.
Example 1.
any words before /r 1d6+4
, or words, /roll 1d6+4
any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}
Example 2.
You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{title=@{character_name}}
} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: Inline roll [[1d6+4]] would usually turn into a wiki link
You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{code|{{title=@{character_name}}}}} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: {{code|Inline roll [[1d6+4]] would usually turn into a wiki link }}
Example:
{{{1}}}
The above documentation is transcluded from Template:Code/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
Shorthand to more easily write code on the wiki.
Example:
/r d20+4
{{code|/r d20+4}}