Difference between revisions of "Template:P/Doc"
Marc Kupper (talk | contribs) m (Template:P/doc moved to Template:P/Doc: Normalize page names) |
Marc Kupper (talk | contribs) (Copyedit plus add usage forms for no named parameters and using the tag parameter) |
||
Line 1: | Line 1: | ||
------ | ------ | ||
− | Documentation for '''[[:Template:P]]''' transcluded from '''[[:Template:P/ | + | Documentation for '''[[:Template:P]]''' transcluded from '''[[:Template:P/Doc]]'''. |
− | This template is for linking to a publication | + | == Purpose == |
− | + | This template is for linking to a ISFDB publication record. | |
− | |||
+ | == Usage == | ||
+ | Call this template with a publication's tag or record number and, optionally, the publication's name or any string to display for the link. | ||
+ | : <code><nowiki> {{P|SHPFRMRSD2000}} </nowiki></code> | ||
gives this link: {{P|SHPFRMRSD2000}} | gives this link: {{P|SHPFRMRSD2000}} | ||
− | Optionally, you can change the displayed link text | + | Optionally, you can change the displayed link text. |
− | + | : <code><nowiki> {{P|SHPFRMRSD2000|Sheepfarmer's Daughter}} </nowiki></code> | |
− | <code><nowiki> {{P|SHPFRMRSD2000| | + | gives this link: {{P|SHPFRMRSD2000|Sheepfarmer's Daughter}} |
− | |||
− | gives this link: {{P|SHPFRMRSD2000| | ||
− | |||
− | |||
− | |||
− | |||
− | + | Note that any string can be passed instead of a publication title, for example, <code><nowiki>{{P|SHPFRMRSD2000|this publication}}</nowiki></code> would display as {{P|SHPFRMRSD2000|this publication}}. | |
+ | The template parameters can also be referenced using the names ''tag'' and ''name'' respectively with the only requirement being that if the named ''tag'' parameter name is used then ''name'' must be used if the second parameter is used. These forms are valid | ||
+ | * <code><nowiki>{{P|tag=SHPFRMRSD2000}}</nowiki></code> displays as {{P|tag=SHPFRMRSD2000}}. | ||
+ | * <code><nowiki>{{P|tag=SHPFRMRSD2000|name=Sheepfarmer's Daughter}}</nowiki></code> displays as {{P|tag=SHPFRMRSD2000|name=Sheepfarmer's Daughter}}. | ||
+ | * <code><nowiki>{{P|SHPFRMRSD2000|name=Sheepfarmer's Daughter}}</nowiki></code> displays as {{P|SHPFRMRSD2000|name=Sheepfarmer's Daughter}}. | ||
− | + | This form is not allowed: | |
+ | * <code><nowiki>{{P|tag=SHPFRMRSD2000|Sheepfarmer's Daughter}}</nowiki></code>. |
Revision as of 15:34, 26 October 2008
Documentation for Template:P transcluded from Template:P/Doc.
Purpose
This template is for linking to a ISFDB publication record.
Usage
Call this template with a publication's tag or record number and, optionally, the publication's name or any string to display for the link.
{{P|SHPFRMRSD2000}}
gives this link: SHPFRMRSD2000
Optionally, you can change the displayed link text.
{{P|SHPFRMRSD2000|Sheepfarmer's Daughter}}
gives this link: Sheepfarmer's Daughter
Note that any string can be passed instead of a publication title, for example, {{P|SHPFRMRSD2000|this publication}}
would display as this publication.
The template parameters can also be referenced using the names tag and name respectively with the only requirement being that if the named tag parameter name is used then name must be used if the second parameter is used. These forms are valid
{{P|tag=SHPFRMRSD2000}}
displays as {{{1}}}.{{P|tag=SHPFRMRSD2000|name=Sheepfarmer's Daughter}}
displays as Sheepfarmer's Daughter.{{P|SHPFRMRSD2000|name=Sheepfarmer's Daughter}}
displays as Sheepfarmer's Daughter.
This form is not allowed:
{{P|tag=SHPFRMRSD2000|Sheepfarmer's Daughter}}
.