Template:Comment: Difference between revisions
m (1 revision) |
m (1 revision imported) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
; Wikitext: | ; Wikitext: | ||
<code><nowiki>{{quote|text=Cry “Havoc,” and let slip the dogs of war.|sign=[[William Shakespeare]]|date=01/01/1889}}</nowiki></code> | <code><nowiki>{{quote|text=Cry “Havoc,” and let slip the dogs of war.|sign=[[William Shakespeare]]|date=01/01/1889}}</nowiki></code> | ||
Line 20: | Line 10: | ||
If you do not provide quoted text, the template generates a parser error message, which will appear in red text in the rendered page. | If you do not provide quoted text, the template generates a parser error message, which will appear in red text in the rendered page. | ||
If any parameter's actual value contains an | If any parameter's actual value contains an equals sign (=), you '''''must''''' use named parameters. (The equals sign gets interpreted as a named parameter otherwise.) | ||
If any parameter's actual value contains characters used for wiki markup syntax (such as | If any parameter's actual value contains characters used for wiki markup syntax (such as vertical bar, brackets, single quotation marks, etc.), you may need to escape it. See [[Template:!]] and friends. | ||
Be wary of URLs which contain restricted characters. The equals sign is especially common. | Be wary of URLs which contain restricted characters. The equals sign is especially common. | ||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
</noinclude> | <templatedata> | ||
{ | |||
"params": { | |||
"text": { | |||
"aliases": [ | |||
"1" | |||
], | |||
"label": "Text", | |||
"description": "Quoted/commented text", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"sign": { | |||
"aliases": [ | |||
"2" | |||
], | |||
"label": "Person", | |||
"description": "Quoted/commenting person", | |||
"type": "wiki-user-name", | |||
"required": true | |||
}, | |||
"date": { | |||
"aliases": [ | |||
"3" | |||
], | |||
"label": "Date", | |||
"description": "Date of comment", | |||
"type": "date", | |||
"required": true | |||
} | |||
}, | |||
"description": "Inserts a comment or quote callout." | |||
} | |||
</templatedata> | |||
</noinclude><includeonly> | |||
<blockquote class="templatequote"><div>{{{text|{{{1|<noinclude>Your comment here</noinclude><includeonly>{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly>}}}}}} | <blockquote class="templatequote"><div>{{{text|{{{1|<noinclude>Your comment here</noinclude><includeonly>{{error|Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}</includeonly>}}}}}} | ||
</div>{{#if:{{{sign|{{{2|<noinclude>TRUE</noinclude>}}}}}}|<div class="templatequotecite">—{{{sign|{{{2|<noinclude>Someone</noinclude>}}}}}}{{#if:{{{date|{{{3|<noinclude>TRUE</noinclude>}}}}}}|, <cite>{{{date|{{{3|<noinclude>''Date''</noinclude>}}}}}}</cite>}}</div >}}</blockquote><noinclude> | </div>{{#if:{{{sign|{{{2|<noinclude>TRUE</noinclude>}}}}}}|<div class="templatequotecite">—{{{sign|{{{2|<noinclude>Someone</noinclude>}}}}}}{{#if:{{{date|{{{3|<noinclude>TRUE</noinclude>}}}}}}|, <cite>{{{date|{{{3|<noinclude>''Date''</noinclude>}}}}}}</cite>}}</div >}}</blockquote><noinclude> | ||
</noinclude> | </noinclude> |
Latest revision as of 12:05, 21 August 2024
- Wikitext
{{quote|text=Cry “Havoc,” and let slip the dogs of war.|sign=[[William Shakespeare]]|date=01/01/1889}}
- Result
Cry “Havoc,” and let slip the dogs of war.—William Shakespeare, 01/01/1889
Restrictions
If you do not provide quoted text, the template generates a parser error message, which will appear in red text in the rendered page.
If any parameter's actual value contains an equals sign (=), you must use named parameters. (The equals sign gets interpreted as a named parameter otherwise.)
If any parameter's actual value contains characters used for wiki markup syntax (such as vertical bar, brackets, single quotation marks, etc.), you may need to escape it. See Template:! and friends.
Be wary of URLs which contain restricted characters. The equals sign is especially common.
Inserts a comment or quote callout.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Text | text 1 | Quoted/commented text | String | required |
Person | sign 2 | Quoted/commenting person | User | required |
Date | date 3 | Date of comment | Date | required |
}}}}}}