Difference between revisions of "Template:P/Doc"
Marc Kupper (talk | contribs) (Copyedit) |
Marc Kupper (talk | contribs) (It turns out tag SHPFRMRSD2000 used in all the examples was not valid...) |
||
Line 3: | Line 3: | ||
== Usage == | == 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. | 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| | + | : <code><nowiki> {{P|BKTG11707}} </nowiki></code> |
− | gives this link: {{P| | + | gives this link: {{P|BKTG11707}} |
Optionally, you can change the displayed link text. | Optionally, you can change the displayed link text. | ||
− | : <code><nowiki> {{P| | + | : <code><nowiki> {{P|BKTG11707|Sheepfarmer's Daughter}} </nowiki></code> |
− | gives this link: {{P| | + | gives this link: {{P|BKTG11707|Sheepfarmer's Daughter}} |
− | Note that any string can be passed instead of a publication title, for example, <code><nowiki>{{P| | + | Note that any string can be passed instead of a publication title, for example, <code><nowiki>{{P|BKTG11707|this publication}}</nowiki></code> displays as {{P|BKTG11707|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 | 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= | + | * <code><nowiki>{{P|tag=BKTG11707}}</nowiki></code> displays as {{P|tag=BKTG11707}}. |
− | * <code><nowiki>{{P|tag= | + | * <code><nowiki>{{P|tag=BKTG11707|name=Sheepfarmer's Daughter}}</nowiki></code> displays as {{P|tag=BKTG11707|name=Sheepfarmer's Daughter}}. |
− | * <code><nowiki>{{P| | + | * <code><nowiki>{{P|BKTG11707|name=Sheepfarmer's Daughter}}</nowiki></code> displays as {{P|BKTG11707|name=Sheepfarmer's Daughter}}. |
This form is not allowed as ''name='' must be used when ''tag='' is used: | This form is not allowed as ''name='' must be used when ''tag='' is used: | ||
− | * <code><nowiki>{{P|tag= | + | * <code><nowiki>{{P|tag=BKTG11707|Sheepfarmer's Daughter}}</nowiki></code> |
------ | ------ | ||
Documentation for '''[[:Template:P]]''' is transcluded from '''[[:Template:P/Doc]]'''. | Documentation for '''[[:Template:P]]''' is transcluded from '''[[:Template:P/Doc]]'''. |
Revision as of 15:55, 26 October 2008
This template is for linking to an 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|BKTG11707}}
gives this link: BKTG11707
Optionally, you can change the displayed link text.
{{P|BKTG11707|Sheepfarmer's Daughter}}
gives this link: Sheepfarmer's Daughter
Note that any string can be passed instead of a publication title, for example, {{P|BKTG11707|this publication}}
displays 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=BKTG11707}}
displays as {{{1}}}.{{P|tag=BKTG11707|name=Sheepfarmer's Daughter}}
displays as Sheepfarmer's Daughter.{{P|BKTG11707|name=Sheepfarmer's Daughter}}
displays as Sheepfarmer's Daughter.
This form is not allowed as name= must be used when tag= is used:
{{P|tag=BKTG11707|Sheepfarmer's Daughter}}
Documentation for Template:P is transcluded from Template:P/Doc.