Difference between revisions of "Template:BASEPAGENAME/doc"

From Project: Gorgon Wiki
Jump to: navigation, search
(Copy-over latest version from wikia:c:templates:Template:BASEPAGENAME/doc)
 
m (Eliminating double nowikis)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{SPW|is not on|name={{msg:BASEPAGENAME}}}}
 
{{SPW|is not on|name={{msg:BASEPAGENAME}}}}
{{Ambox
+
;Description
|border=red
+
:This is a drop-in functionality for wikis that don't have [[mw:Special:MyLanguage/Help:Subpages|Subpages]] enabled.
|type= Dropin !
+
:This documentation is shared between templates affected by this, see the '''See also''' section at bottom.
|info= This is a dropin functionality for wikis that don't have [[mw:Special:MyLanguage/Help:Subpages|Subpages]] enabled !
+
 
}}
 
 
;Usage
 
;Usage
Use <code><nowiki>{{</nowiki>msg:{{msg:BASEPAGENAME}}<nowiki>}}</nowiki></code> inplace of <code><nowiki>{{</nowiki>{{msg:BASEPAGENAME}}<nowiki>}}</nowiki></code> to make use of the same functionality as the [[mw:Special:MyLanguage/Help:Magic words#Page_names|magic-word]] using a template with same name if it exists.
+
:To make use of the same functionality as the [[mw:Special:MyLanguage/Help:Magic words#Page_names|magic-word]] using a template with same name if it exists.
 +
::Use <code><nowiki>{{</nowiki>msg:{{msg:BASEPAGENAME}}<nowiki>}}</nowiki></code> inplace of <code><nowiki>{{</nowiki>{{msg:BASEPAGENAME}}<nowiki>}}</nowiki></code>
 +
::Or <code><nowiki>{{</nowiki>msg:{{msg:BASEPAGENAME}}<nowiki>|</nowiki><var>Pagename</var><nowiki>}}</nowiki></code> inplace of <code><nowiki>{{</nowiki>{{msg:BASEPAGENAME}}:<var>Pagename</var><nowiki>}}</nowiki></code> to provide a pagename to operate upon.
 +
::If no <var>Pagename</var> is provided it defaults to <span style="color:teal;">{{((}}FULLPAGENAME{{))}}</span>.
  
 
{| class="wikitable" style="background-color:teal;"
 
{| class="wikitable" style="background-color:teal;"
Line 44: Line 46:
 
| <code>{{((}}#titleparts:<var>{{((}}PAGENAME:Tinput {{))}}</var><nowiki>|</nowiki>-1{{))}}</code>
 
| <code>{{((}}#titleparts:<var>{{((}}PAGENAME:Tinput {{))}}</var><nowiki>|</nowiki>-1{{))}}</code>
 
| <code>{{#titleparts:{{PAGENAME:{{{1|{{FULLPAGENAME}}/1 1/2 2}}} }}|-1}}</code>
 
| <code>{{#titleparts:{{PAGENAME:{{{1|{{FULLPAGENAME}}/1 1/2 2}}} }}|-1}}</code>
 +
|-
 +
! rowspan="2" | #titleparts: <nowiki>||</nowiki>-1
 +
| <code>{{((}}#titleparts:<var>{{((}}PAGENAME:input {{))}}</var><nowiki>||</nowiki>-1{{))}}</code>
 +
| <code>{{#titleparts:{{PAGENAME:{{{1|{{FULLPAGENAME}}}}} }}||-1}}</code>
 +
|-
 +
| <code>{{((}}#titleparts:<var>{{((}}PAGENAME:Tinput {{))}}</var><nowiki>||</nowiki>-1{{))}}</code>
 +
| <code>{{#titleparts:{{PAGENAME:{{{1|{{FULLPAGENAME}}/1 1/2 2}}} }}||-1}}</code>
 +
|}
 +
 +
{| class="wikitable" style="background-color:teal;"
 +
|+ Functionality table for debugging
 +
! functionality !! code !! result
 
|-
 
|-
 
! rowspan="2" | {{msg:BASEPAGENAME}}
 
! rowspan="2" | {{msg:BASEPAGENAME}}
Line 53: Line 67:
 
|-
 
|-
 
! rowspan="2" | msg:{{msg:BASEPAGENAME}}
 
! rowspan="2" | msg:{{msg:BASEPAGENAME}}
| <code>{{((}}msg:{{msg:BASEPAGENAME}}:<var>input</var>{{))}}</code>
+
| <code>{{((}}msg:{{msg:BASEPAGENAME}}<nowiki>|</nowiki><var>input</var>{{))}}</code>
| <code>{{msg:{{msg:BASEPAGENAME}}:{{FULLPAGENAME}} }}</code>
+
| <code>{{msg:{{msg:BASEPAGENAME}}|{{FULLPAGENAME}} }}</code>
 
|-
 
|-
| <code>{{((}}msg:{{msg:BASEPAGENAME}}:<var>Tinput</var>{{))}}</code>
+
| <code>{{((}}msg:{{msg:BASEPAGENAME}}<nowiki>|</nowiki><var>Tinput</var>{{))}}</code>
| <code>{{msg:{{msg:BASEPAGENAME}}:{{FULLPAGENAME}}/1 1/2 2 }}</code>
+
| <code>{{msg:{{msg:BASEPAGENAME}}|{{FULLPAGENAME}}/1 1/2 2 }}</code>
 
|}
 
|}
 +
 +
;Dependencies
 +
*{{t|((}}, {{t|(((}}, {{t|))}}, {{t|)))}} and {{t|SPW}} to provide this documentation.
 +
*MediaWiki [[mw:Help:Magic words#Transclusion modifiers|Help:Magic words#Transclusion modifiers]] For the <i>msg</i> MAGICWORD.
 +
*MediaWiki [[mw:Help:Magic words#Page names|Help:Magic words#Page names]].
 +
*MediaWiki [[mw:Help:Extension:ParserFunctions#.23titleparts|Help:Extension:ParserFunctions##titleparts]] for logic used in the functionality.
  
 
;See also
 
;See also
*[[Template:{{#ifeq:{{msg:BASEPAGENAME}}|BASEPAGENAME
+
*[[Template:BASEPAGENAME]]
            |BASEPAGENAMEE
+
*[[Template:BASEPAGENAMEE]]
            |BASEPAGENAME
+
*[[Template:SUBPAGENAME]]
            }}]]
+
*[[Template:SUBPAGENAMEE]]
 
<includeonly>
 
<includeonly>
 
<!-- Categories/interwikis for the template itself -->
 
<!-- Categories/interwikis for the template itself -->

Latest revision as of 06:22, 27 April 2016

Description
This is a drop-in functionality for wikis that don't have Subpages enabled.
This documentation is shared between templates affected by this, see the See also section at bottom.
Usage
To make use of the same functionality as the magic-word using a template with same name if it exists.
Use {{msg:BASEPAGENAME}} inplace of {{BASEPAGENAME}}
Or {{msg:BASEPAGENAME|Pagename}} inplace of {{BASEPAGENAME:Pagename}} to provide a pagename to operate upon.
If no Pagename is provided it defaults to {{FULLPAGENAME}}.
Logic table for debugging
code result
input Template:(((1|{{FULLPAGENAME}}}}} Template:BASEPAGENAME/doc
Tinput Template:(((1|{{FULLPAGENAME}}/1 1/2 2}}} Template:BASEPAGENAME/doc/1 1/2 2
NAMESPACE {{NAMESPACE}} Template
PAGENAME {{PAGENAME:input }} BASEPAGENAME/doc
{{PAGENAME:Tinput }} BASEPAGENAME/doc/1 1/2 2
#titleparts: |1 {{#titleparts:{{PAGENAME:input }}|1}} BASEPAGENAME
{{#titleparts:{{PAGENAME:Tinput }}|1}} BASEPAGENAME
#titleparts: |-1 {{#titleparts:{{PAGENAME:input }}|-1}} BASEPAGENAME
{{#titleparts:{{PAGENAME:Tinput }}|-1}} BASEPAGENAME/doc/1 1
#titleparts: ||-1 {{#titleparts:{{PAGENAME:input }}||-1}} doc
{{#titleparts:{{PAGENAME:Tinput }}||-1}} 2 2
Functionality table for debugging
functionality code result
BASEPAGENAME {{BASEPAGENAME:input}} BASEPAGENAME
{{BASEPAGENAME:Tinput}} BASEPAGENAME/doc/1 1
msg:BASEPAGENAME {{msg:BASEPAGENAME|input}} BASEPAGENAME
{{msg:BASEPAGENAME|Tinput}} BASEPAGENAME/doc/1 1
Dependencies
See also