Template:Blockquote/doc: Difference between revisions

more documentation for parameter "multiline"; resorted "Parameters" section
(merged example sections, example fix; fixed wording in templatedata)
(more documentation for parameter "multiline"; resorted "Parameters" section)
Line 16:
 
=== Examples ===
;Basic use{{colon}}:
{{markup|
<nowiki>{{Quote
|text=Quoted material.
}} </nowiki>|{{Quote
|text=Quoted material.
}}}}
}}}}<!-- Template:Mra -->
 
;With attribution displayed{{colon}}:
{{markup|
<nowiki>{{Quote
|text=Quoted material.
|author=First M. Last
}} </nowiki>|{{Quote
|text=Quoted material.
|author=First M. Last
}}}}
}}}}<!-- Template:Mra -->
 
;With more attribution{{colon}}:
{{markup|
<nowiki>
Line 42:
|title="Article Title"
|source=''Book Title'' (date)
}} </nowiki>|
{{Quote
|text=Quoted material.
Line 50:
}}}}
 
;Example with "multiline"{{colon}}
;An ample example<!-- no pun intended -->
Especially useful for translated quotes; ''see [[#multiline|notes about this parameter]]''.
|* with "multiline" ={{tick}}
{{markup|
<nowiki>
{{quote|text=
{{lang|fr|Ceci n’est pas une pipe.}}
This is Not a Pipe.
|multiline=yes
|author=[[René Magritte]]
|title=[[The Treachery of Images]]
}}</nowiki>|
{{quote|text=
{{lang|fr|Ceci n’est pas une pipe.}}
This is Not a Pipe.
|multiline=yes
|author=[[René Magritte]]
|title=[[The Treachery of Images]]
}}}}
* for comparison without "multiline" {{cross}}
{{markup|
<nowiki>
{{quote|text=
{{lang|fr|Ceci n’est pas une pipe.}}
This is Not a Pipe.
|author=[[René Magritte]]
|title=[[The Treachery of Images]]
}}</nowiki>|
{{quote|text=
{{lang|fr|Ceci n’est pas une pipe.}}
This is Not a Pipe.
|author=[[René Magritte]]
|title=[[The Treachery of Images]]
}}}}
 
;An ample example<!-- no pun intended -->{{colon}}
{{markupv
|markup=<syntaxhighlight lang="moin">{{Quote|text=Cry "Havoc" and let slip the dogs of war.|character=Mark Antony|author=[[William Shakespeare]]|title=''[[Julius Caesar (play)|Julius Caesar]]''|source=act III, scene</syntaxhighlight>
Line 57 ⟶ 92:
 
== Parameters ==
=== Parameter list ===
<pre>
{{Quote
| text =
| author =
| title =
| source =
| character =
| multiline =
| style =
| notrim =
}}
</pre>
 
See also section [[#TemplateData]].
 
=== Quoted text ===
{{para|text}} a.k.a. {{para|1}}—The material being quoted, without quotation marks around it. It is always safest to name this parameter (rather than use an unnamed positional parameter), because, otherwise, any inclusion of a [[Template:=|non-escaped "=" character]] (e.g., in a URL in a source citation) will break the template.
 
Line 80 ⟶ 132:
 
=== Rarely used technical parameters ===
* {{anchor|multiline}}{{para|multiline}} – keep forced linebreaks in output.<br>
{{para|style}} – allows specifying additional [[Help:Cascading Style Sheets|CSS]] styles ({{em|not}} classes) to apply to the {{code|lang=html|code=<blockquote>...</blockquote>}} element. {{Crossreference|(See [[#Nested quotations]], below, for the most common use case.)}}
''Notes:''
 
** Will only be applied if at least one of these other parameters or its aliases is not empty (including implicit, unnamed parameters):<br>{{para|author}}, {{para|title}}, {{para|source}}, or {{para|character}}.
=== Parameter list ===
** The value does not matter, as long it is not empty. Using a so called speaking parameter (such as <code>true</code> or <code>yes</code>) is highly recommended. Avoid values that can surprise users (e.g. <code>false</code> or <code>no</code>).
<pre>
* {{para|style}} – allows specifying additional [[Help:Cascading Style Sheets|CSS]] styles ({{em|not}} classes) to apply to the {{code|lang=html|code=<blockquote>...</blockquote>}} element. {{Crossreference|(See [[#Nested quotations]], below, for the most common use case.)}}
{{Quote
| text =
| author =
| title =
| source =
| character =
| multiline =
| style =
}}
</pre>
 
== Reference citations ==
Line 202 ⟶ 245:
"example": "Mark Antony",
"suggested": false
},
"multiline": {
"label": "multiline",
"description": "Keeps forced linebreaks in output",
"type": "string",
"required": false,
"example": "true",
"suggested": false
},
"style": {
"label": "style",
"description": "Additional CSS styles (not classes) to apply",
"type": "string",
"required": false,
"example": "font-size:inherit;",
Anonymous user