Template:Blockquote/doc: Difference between revisions

update docs for recent change
(Note: This template does work correctly if there are URLs in the phrase; Workarounds?)
(update docs for recent change)
Line 3:
'''{{tl|Quote}}''' adds a [[block quote]] to an article page.
 
This is easier to type and more wiki-like than the equivalent HTML <code><nowiki><{{tag|blockquote></nowiki></code>}} tags, has additional pre-formatted attribution and source parameters, and contains a workaround for [[Bugzilla:6200]], which means you don't need to type <code><nowiki><{{tag|p></nowiki></code>}} tags manually.
 
Note: Block quotes do not normally contain quotation marks. See [[Block quote#Formatting block quotations|Formatting block quotations]].
 
=== UsageSynopsis ===
'''Note: This template does work correctly if the phrase contains characters found in some URLs.'''
 
;Unnamed (positional) parameters
=== Usage ===
<code><nowiki>{{Quotequote|Phrasephrase|Somebodyperson|source}}</nowiki></code> produces:
 
; Named parameters
<code><nowiki>{{Quote|Phrase}}</nowiki></code> produces:
<code><nowiki>{{Quotequote|Phrasetext=phrase|Somebodysign=person|''Source''source=source}}</nowiki></code> produces:
 
{{Quote|Phrase}}
 
<code><nowiki>{{Quote|Phrase|Somebody}}</nowiki></code> produces:
 
{{Quote|Phrase|Somebody}}
 
<code><nowiki>{{Quote|Phrase|Somebody|''Source''}}</nowiki></code> produces:
 
{{Quote|Phrase|Somebody|''Source''}}
 
=== Example ===
 
; Wikitext:
<!-- for the documentation don't subst the result -->
<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>
{| class="wikitable"
| '''Code'''
| '''Result'''
|-
| valign="top" | <code>{&#123;{{BASEPAGENAME}}&#124;<nowiki>{{lorem ipsum}}</nowiki>|Some Guy Who Thought He Spoke Latin|'&#39;Pseudo-Italic Nonsense&#39;'&#125;}</code>
| {{msg:{{BASEPAGENAME}}|{{lorem ipsum}}|Some Guy Who Thought He Spoke Latin|''Pseudo-Italic Nonsense''}}
|}
 
|; '''Result''':
=== Issues ===
{{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 ===
Phrases containing some URLs are not displayed at all:
 
If you do not provide quoted text, the template generates a parser error message, which will appear in red text in the rendered page.
<code><nowiki>
{{Quote|Phrase with a URL: http://w.a.o/d.php?id=T |Somebody|''Source''}}</nowiki></code> produces:
 
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.)
{{Quote|Phrase with a URL: http://w.a.o/d.php?id=T |Somebody|''Source''}}
 
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.
<code><nowiki>
{{Quote|1=Phrase with a URL: http://w.a.o/d.php?id=T |Somebody|''Source''}}</nowiki></code> produces:
 
Be wary of URLs which contain restricted characters. The equals sign is especially common.
{{Quote|1=Phrase with a URL: http://w.a.o/d.php?id=T |Somebody|''Source''}}
 
=== See also ===
 
{{Quotation templates see also}}
 
Anonymous user