Template:Quote/doc: Difference between revisions

From Habbox Wiki
Jump to navigation Jump to search
Spirit (talk | contribs)
No edit summary
Laura (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{tlx|Quote}} adds a quoteto a page including optional paramaters for speaker (attribution) and source (link posted)
== Usage ==
== Usage ==


{{tlx|Quote}} adds a block quotation to a page.
To use the Quote template use the following layout: <pre>{{Quote|Quoted Text|Author|Source}}</pre>  
 
This is easier to type and more wiki-like than the equivalent HTML 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. -->
 
 
=== Synopsis ===


;Unnamed (positional) parameters
The first parameter is the text of the quote, the second parameter is the person (or entity) who said it, and the third parameter is where the quote came from.
<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
== Examples ==
<code><nowiki>{{quote|text=phrase|sign=person|source=source}}</nowiki></code>


=== Example ===
===Quoted Text===
<code><nowiki>{{Quote|Example Text.}}</nowiki></code>


;Wikitext:
{{Quote|Example Text.}}
<code><nowiki>{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=William Shakespeare|source=''Julius Caesar'', act III, scene I}}</nowiki></code>


;Result:
===Quoted Text with Author===
{{Quote|text=Cry "Havoc" and let slip the dogs of war.|sign=William Shakespeare|source=''Julius Caesar'', act III, scene I}}
<code><nowiki>{{Quote|Quoted Text|Author}}</nowiki></code>


=== Restrictions ===
{{Quote|Quoted Text|Author}}


If you do not provide quoted text, the template generates a parser error message, which will appear in red text in the rendered page.
===Quoted Text with Linked Source===
<code><nowiki>{{Quote|Quoted Text.|[http://www.example.com/]}}</nowiki></code>


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|Quoted Text.|[http://www.example.com/]}}


If any parameter's actual value contains characters used for wiki markup syntax (such as pipe, brackets, single quotation marks, etc.), you may need to escape it. See [[Template:!]] and friends.
===Quoted Text with Author and Linked Source===
<code><nowiki>{{Quote|Quoted Text.|Author|[http://www.example.com/]}}</nowiki></code>


Be wary of URLs which contain restricted characters. The equals sign is especially common.
{{Quote|Quoted Text.|Author|[http://www.example.com/]}}


[[Category:Quote Templates]]
[[Category:Quote Templates]]

Revision as of 17:30, 16 October 2021

{{Quote}} adds a quoteto a page including optional paramaters for speaker (attribution) and source (link posted)

Usage

To use the Quote template use the following layout:

{{Quote|Quoted Text|Author|Source}}

The first parameter is the text of the quote, the second parameter is the person (or entity) who said it, and the third parameter is where the quote came from.


Examples

Quoted Text

{{Quote|Example Text.}}

“{{{quotetext}}}”


Quoted Text with Author

{{Quote|Quoted Text|Author}}

“{{{quotetext}}}”


Quoted Text with Linked Source

{{Quote|Quoted Text.|[http://www.example.com/]}}

“{{{quotetext}}}”


Quoted Text with Author and Linked Source

{{Quote|Quoted Text.|Author|[http://www.example.com/]}}

“{{{quotetext}}}”