Template:DraftLink/doc View history

m (added example outputs)
m (added template support)
Line 2: Line 2:
<!-- ADD DOCUMENTATION BELOW THIS LINE -->
<!-- ADD DOCUMENTATION BELOW THIS LINE -->


This template is designed to be used when creating a draft for new pages in the User namespace. It can produce a link (or transclusion) to a related page in the same namespace. When it appears in the user namespace, the link will be preceded with the same User prefix as the page it is displayed on. When it is moved to a different (or main) namespace, the link will be used without a prefix.
This template is designed to be used when creating a draft for new pages in the User namespace. It can produce a link (or transclusion) to a related page in the same namespace.
*When it appears in the user namespace, the link will be preceded with the same User prefix as the page it is displayed on.
*When it appears in the template namespace, the link will be preceded with '''Template:'''
*When it is moved to a different (or main) namespace, the link will be used without a prefix.


It accepts one unnamed parameter for the link text. If the parameter is not specified the BASEPAGENAME is used instead.
It accepts one unnamed parameter for the link text. If the parameter is not specified the BASEPAGENAME is used instead.
Line 22: Line 25:
|User||User:PesachZ/Road Names||{{tlx|DraftLink|Road Names/USA}}||User:PesachZ/Road Names/USA
|User||User:PesachZ/Road Names||{{tlx|DraftLink|Road Names/USA}}||User:PesachZ/Road Names/USA
|-
|-
|Template||Template:DraftLink||{{tlx|DraftLink}}||DraftLink
|Template||Template:DraftLink||{{tlx|DraftLink}}||Template:DraftLink
|-
|-
|Template||Template:DraftLink||{{tlx|DraftLink|Road Names/USA}}||Road Names/USA
|Template||Template:DraftLink||{{tlx|DraftLink|Road Names/USA}}||Template:Road Names/USA
|}
|}
<includeonly>
<includeonly>

Revision as of 14:46, 3 May 2015

This is a documentation subpage for Template:DraftLink.
It contains usage information, categories and other content that is not part of the original template page.

This template is designed to be used when creating a draft for new pages in the User namespace. It can produce a link (or transclusion) to a related page in the same namespace.

  • When it appears in the user namespace, the link will be preceded with the same User prefix as the page it is displayed on.
  • When it appears in the template namespace, the link will be preceded with Template:
  • When it is moved to a different (or main) namespace, the link will be used without a prefix.

It accepts one unnamed parameter for the link text. If the parameter is not specified the BASEPAGENAME is used instead.


Example Usage

Location sensitive Variable Outputs
Space PAGENAME DraftLink Output
Main Road Names {{DraftLink}} Road Names
User User:PesachZ/Road Names {{DraftLink}} User:PesachZ/Road Names
Main Road Names {{DraftLink|Road Names/USA}} Road Names/USA
User User:PesachZ/Road Names {{DraftLink|Road Names/USA}} User:PesachZ/Road Names/USA
Template Template:DraftLink {{DraftLink}} Template:DraftLink
Template Template:DraftLink {{DraftLink|Road Names/USA}} Template:Road Names/USA