Template:Quote: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Initial Quote template page)
 
mNo edit summary
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<blockquote class="templatequote"><div class="Bug6200">{{{text|{{{quote|{{{1|<noinclude>[[w:Lorem ipsum|Lorem ipsum]] dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</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|{{{cite|{{{2|<noinclude>TRUE</noinclude>}}}}}}}}}
{{Doc}}<includeonly><onlyinclude><div style="position:relative; padding-left:14px"><!--
|<div class="templatequotecite">&#8212;{{{sign|{{{cite|{{{2|<noinclude>[[Someone's full name|Someone]]</noinclude>}}}}}}}}}{{#if:{{{source|{{{3|<noinclude>TRUE</noinclude>}}}}}}
--> <div style="width:4px; height:100%; background-color:#4f545c; border-radius:4px; position:absolute; left:0"></div><!--
  |,&nbsp;<cite>{{{source|{{{3|<noinclude>Source</noinclude>}}}}}}</cite>
--> {{#if:{{{1|{{{text|}}}}}}|{{{1|{{{text}}}}}}|<span style=color:rgb(231,76,60)>Error</span>: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)}}<!--
}}</div>
--> {{#if:{{{2|{{{sign|}}}}}}|<div>{{{2|{{{sign}}}}}}{{#if:{{{3|{{{source|}}}}}}|, ''{{{3|{{{source}}}}}}''}}</div>}}</div></onlyinclude></includeonly>
}}</blockquote>
<noinclude>
</noinclude>
 
== Usage ==
 
<code><nowiki>{{Quote}}</nowiki></code> adds a [[block quotation]] to an article page.
 
This is easier to type and more wiki-like than the equivalent [[HTML]] {{tag|blockquote}} tags, and has additional pre-formatted attribution and source parameters. <!-- THIS WORKAROUND FAILED; see talk page and its archives. New workaround provided hereafter. It also contains a workaround for [[Bugzilla:6200]], which means you don't need to type {{tag|p}} tags manually. -->
 
'''Note:''' Block quotes do not normally contain quotation marks.
 
=== Synopsis ===
 
;Unnamed (positional) parameters
<code><nowiki>{{quote|phrase|person|source}}</nowiki></code>
This markup will fail if any parameter contains an equals sign (=).
 
;Numbered (positional) parameters
<code><nowiki>{{quote|1=phrase|2=person|3=source}}</nowiki></code>
 
;Named parameters
<code><nowiki>{{quote|text=phrase|sign=person|source=source}}</nowiki></code>
 
=== Example ===
 
;Wikitext:
<code><nowiki>{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=[[William Shakespeare]]|source=''[[Julius Caesar (play)|Julius Caesar]]'', act III, scene I}}</nowiki></code>
 
;Result:
{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=[[William Shakespeare]]|source=''[[Julius Caesar (play)|Julius Caesar]]'', act III, scene I}}
 
=== 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|pipe]], [[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.

Latest revision as of 06:43, 17 July 2024

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

Adds a block quotation to an article page.

Parameters and Examples

Note.pngNote:Named parameters allow you to use equality symbols and much more. Numbered parameters can be used instead.
Parameter Description Example Preview
No parameters Outputs an error message
{{Quote}}
Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)
{{{1}}} or {{{text}}} Quote text.
{{Quote|Quote text.}}
{{Quote|1=Quote text.}}
{{Quote|text=Quote text.}}
Quote text.
Quote text.
Quote text.
{{{2}}} or {{{sign}}} Quote signature.
{{Quote|Quote text.|[[Gabe Newell]]}}
{{Quote|text=Quote text.|sign=[[Gabe Newell]]}}
Quote text.
Quote text.
{{{3}}} or {{{source}}} Quote source.

Does not appear if the signature was not specified.

{{Quote | Quote text. | [[Gabe Newell]] | Source }}
{{Quote | text = Quote text. | sign = [[Gabe Newell]] | source = Source }}
Quote text.
Gabe Newell, Source
Quote text.
Gabe Newell, Source