Difference between revisions of "Template:P/Doc"

From ISFDB
Jump to navigation Jump to search
m (Template:P/doc moved to Template:P/Doc: Normalize page names)
(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/doc]]'''.
+
Documentation for '''[[:Template:P]]''' transcluded from '''[[:Template:P/Doc]]'''.
  
This template is for linking to a publication, It takes as its argument a publication tag or record number. Thus, for example
+
== Purpose ==
 
+
This template is for linking to a ISFDB publication record.
<code><nowiki> {{P|SHPFRMRSD2000}} </nowiki></code>
 
  
 +
== 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 with the name parameter. For example:
+
Optionally, you can change the displayed link text.
 
+
: <code><nowiki> {{P|SHPFRMRSD2000|Sheepfarmer's Daughter}} </nowiki></code>
<code><nowiki> {{P|SHPFRMRSD2000|name=Sheepfarmer's Daughter}} </nowiki></code>
+
gives this link: {{P|SHPFRMRSD2000|Sheepfarmer's Daughter}}
 
 
gives this link: {{P|SHPFRMRSD2000|name=Sheepfarmer's Daughter}}
 
 
 
and
 
 
 
<code><nowiki> {{P|SHPFRMRSD2000|name=SFD}} </nowiki></code>
 
  
gives this link: {{P|SHPFRMRSD2000|name=SFD}}
+
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}}.
  
When a publication record is displayed, either the record numvber or the tag (depending on yow you got there) will be included in the URL (web address0 after "pl.cgi?". When a pub is being edited, the tag will appear in the TAG field, and the record number in the URL.
+
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

This form is not allowed:

  • {{P|tag=SHPFRMRSD2000|Sheepfarmer's Daughter}}.