Minecraft Wiki
mNo edit summary
(simplify with a variable and #tag:nowiki; ensure the output is always linked when nolink isn't defined (since protocol-relative URLs aren't auto-linked by MW, and they are now output by {{fullurl}} here at least some of the time))
(17 intermediate revisions by 13 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{nolink|}}} | <nowiki>http://www.minecraftwiki.net/index.php?title=</nowiki>{{{1}}}{{#if: {{{2|}}} | &{{{2}}} }} |<!--
+
<includeonly>{{ #vardefine: $fullurl-url | {{fullurl: {{{1}}} | {{ #if: {{{2|}}} | {{{2}}} | {{ #if: {{{action|}}} | action={{{action}}} }} }} }}
  +
}}{{ #if: {{{nolink|}}}
--><span class="plainlinks">{{#if: {{{text|}}} | [ }}{{fullurl: {{{1}}} | {{{2|}}} }} {{#if: {{{text|}}} | {{{text}}}]}}</span>}}</includeonly><noinclude>
 
  +
| {{ #tag: nowiki | {{ #var: $fullurl-url }} }}
{{/doc}}
 
  +
| [{{ #var: $fullurl-url }} {{ #if: {{{text|}}} | {{{text}}} | {{ #var: $fullurl-url }} }}]
 
[[Category:Templates]]</noinclude>
+
}}</includeonly><noinclude>
  +
{{documentation}}
  +
<!-- Put categories/interwiki on the documentation page -->
  +
</noinclude>

Revision as of 18:20, 13 June 2016

[view | edit | history | purge]Documentation

This template can be used to output the full wiki URL (https://minecraft.fandom.com/index.php?title=) in plaintext or within a plainlink span using the fullurl magic word. This template is useful for actions, for example action=edit to link to the edit box.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

Target page name. Language, interwiki and section links may be used.

Default
{{FULLPAGENAME}}
Example
zh:Minecraft Wiki
Page nameoptional
Page action2

All page actions, separated by '&'. You must use {{=}} or &#124; to escape all '='.

Example
veaction{{=}}edit&section{{=}}1
Stringoptional
Page actionaction

Similar to {{{2}}}, but no need to escape '='.

Example
edit&section=1
Stringoptional
Texttext 3

Change the text of the link.

Example
Edit
Stringoptional
No linknolink

Display the URL directly without creating a link, ignoring {{{3}}} and {{{text}}}.

Auto value
1
Stringoptional

Usage

To use this template you put the name of the page you want and any actions you want to perform (anything that is after an &).

Examples

{{fullurl|Blocks|action=edit}}

Will output: https://minecraft.fandom.com/wiki/Blocks?action=edit

{{fullurl|Blocks|action=edit|nolink=1}}

Will output: https://minecraft.fandom.com/wiki/Blocks?action=edit

{{fullurl|Blocks|action=edit|text=Edit page}}

Will output: Edit page

Notes

  • All url parameters are kept within the same parameter. ({{fullurl|MediaWiki:Common.css|action=raw&ctype=text/css}} instead of {{fullurl|MediaWiki:Common.css|action=raw|ctype=text/css}})
[view | edit | history | purge]The above documentation is transcluded from Template:Fullurl/doc.