Difference between revisions of "Template:SMWQ"

From Wikispooks
Jump to navigation Jump to search
Line 10: Line 10:
 
|{{t|{{PURPLE|wikipedia}}}}    = URL of the matching Wikipedia page, if any ''([[Property:Has wikipediaPage]])''
 
|{{t|{{PURPLE|wikipedia}}}}    = URL of the matching Wikipedia page, if any ''([[Property:Has wikipediaPage]])''
 
|{{t|{{BLUE|location}}}}      = The location where the quote was made ''([[Property:Has location]])''
 
|{{t|{{BLUE|location}}}}      = The location where the quote was made ''([[Property:Has location]])''
|{{t|{{GRAY|format}}}}        = Currently unimplemented, but for changing the presentation
+
|{{t|{{PURPLE|ref_URL}}}}      = URL of a reference page ''([[Property:Has refURL]])''
 +
|{{t|{{BLUE|ref_name}}}}      = Name of a reference page ''([[Property:Has refName]])''
 +
|{{t|ref_details}}            = Extra details for the reference
 +
|{{t|{{GRAY|format}}}}        = Currently unimplemented, but for changing the presentation. Values ="QB" (quotation box)
 
|{{t|note}}                    = Extra text field
 
|{{t|note}}                    = Extra text field
 
}}</poem></noinclude><includeonly>{{#subobject:
 
}}</poem></noinclude><includeonly>{{#subobject:
Line 20: Line 23:
 
|Has publicationDate={{{date|}}}
 
|Has publicationDate={{{date|}}}
 
}}{{#switch: {{{format|}}}
 
}}{{#switch: {{{format|}}}
|QB=  
+
| QB =
|#default {{QB|“{{{text|}}}”<br/><br/>''{{{authors|}}}''{{#if: {{{location|}}}| ({{{location|}}})}}{{#if: {{{wikipedia|}}}| [{{{wikipedia}}} {{{Wikipedia|}}}]}}{{#if: {{{note|}}}|<br/>{{{note}}}}}}}
+
| =
 +
| #default = {{QB|“{{{text|}}}”<br/><br/>''{{{authors|}}}''{{#if: {{{location|}}}| ({{{location|}}})}}{{#if: {{{wikipedia|}}}| [{{{wikipedia}}} {{{Wikipedia|}}}]}}{{#if: {{{note|}}}|<br/>{{{note}}}}}}}
 
}}</includeonly>
 
}}</includeonly>

Revision as of 13:20, 18 April 2016

This template is for quotations.
It marks them up, semantically as well as physically.

Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameters were formerly available, but have been upgraded. Some may still work, but do not use these.

It takes the following parameters:

{{SMWQ
|text = The text of the quotation
|date = The status of this object (Property:Has publicationDate)
|authors = Comma separated list of author(s). Usually just a single name however. If ommitted, this defaults to the PAGENAME (Property:Has author)
|subjects = Optional list of subjects for this quote (Property:Is about)
|wikipedia = URL of the matching Wikipedia page, if any (Property:Has wikipediaPage)
|location = The location where the quote was made (Property:Has location)
|ref_URL = URL of a reference page (Property:Has refURL)
|ref_name = Name of a reference page (Property:Has refName)
|ref_details = Extra details for the reference
|format = Currently unimplemented, but for changing the presentation. Values ="QB" (quotation box)
|note = Extra text field
}}