v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Action"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Created page)
 
m ({{FULLPAGENAME}} instead)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="{{#ifeq:{{{pl|yes}}}|no||plainlinks}}">[{{fullurl:{{{2|{{FULLPAGENAME}}}}}|action={{{1|view}}}}}]</span></includeonly><noinclude>
+
<includeonly><span class="{{#ifeq:{{{pl|yes}}}|no||plainlinks}}">[{{fullurl:{{#if:{{{2|}}}|{{{2}}}|{{FULLPAGENAME}}}}|action={{{1|view}}}}} {{{3|{{{2|{{FULLPAGENAME}}}}}}}}]</span></includeonly><noinclude>
This is an extended version of {{tl|edit}}, supporting other actions (history, purge, etc.).
+
This is an extended version of {{tl|edit}}, supporting other actions (history, purge, etc.). It essentially removes the arrow by an internal link that appears as external (for example, links to edit an article).
  
 
For more information, see [http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Actions the MediaWiki manual].
 
For more information, see [http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Actions the MediaWiki manual].
  
 
Note that, when updating pages, "purge" should be used on the ''including'' page, not the page being transcluded.
 
Note that, when updating pages, "purge" should be used on the ''including'' page, not the page being transcluded.
 +
 +
Usage:
 +
<pre>{{Action|action|page|link title|pl=yes/no}}</pre>
 +
Where
 +
*"action" is a valid action
 +
*"page" is '''optional''' - to skip this, just use a double bar, like this: <code><nowiki>{{action|edit||...}}</nowiki></code>
 +
*"link title", the text displayed for the link, is also optional - if it is not specified, it defaults to the "action"
 +
*Adding <code>|pl=no</code> will show an arrow next to the link. Only use this if you're sure you need it.
 +
 +
Note: if you need more options specified in the URL, simply specify them in the first parameter. You may need to use {{tl|{{=}}}} to escape = characters.
 +
 +
Example: <pre>{{action|edit&section{{=}}new|Template talk:Action|New talk section}}</pre> {{action|edit&section{{=}}new|Template talk:Action|New talk section}}
 +
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 00:29, 25 June 2013

This is an extended version of {{edit}}, supporting other actions (history, purge, etc.). It essentially removes the arrow by an internal link that appears as external (for example, links to edit an article).

For more information, see the MediaWiki manual.

Note that, when updating pages, "purge" should be used on the including page, not the page being transcluded.

Usage:

{{Action|action|page|link title|pl=yes/no}}

Where

  • "action" is a valid action
  • "page" is optional - to skip this, just use a double bar, like this: {{action|edit||...}}
  • "link title", the text displayed for the link, is also optional - if it is not specified, it defaults to the "action"
  • Adding |pl=no will show an arrow next to the link. Only use this if you're sure you need it.

Note: if you need more options specified in the URL, simply specify them in the first parameter. You may need to use {{=}} to escape = characters.

Example:

{{action|edit&section{{=}}new|Template talk:Action|New talk section}}

New talk section