Template:Quote: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Initial Quote template page)
 
(Moved documentation to /doc subpage)
Line 3: Line 3:
   |,&nbsp;<cite>{{{source|{{{3|<noinclude>Source</noinclude>}}}}}}</cite>
   |,&nbsp;<cite>{{{source|{{{3|<noinclude>Source</noinclude>}}}}}}</cite>
  }}</div>
  }}</div>
}}</blockquote>
}}</blockquote><noinclude>
<noinclude>
<!-- Add categories to the /doc subpage -->
{{Documentation}}
</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.

Revision as of 18:06, 24 February 2020

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.
SomeoneSource
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 NewellSource
Quote text.
Gabe NewellSource