Difference between revisions of "Template:Main/en"

From WardleyPedia
Jump to: navigation, search
(Importing a new version from external source)
m (14 revisions imported)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div class="rellink relarticle mainarticle">{{#ifeq:{{SUBJECTSPACE}}|Category|The main {{#ifeq:{{NAMESPACE:{{{1}}}}}||article|page}}{{#if:{{{2|}}}|s}} for this [[Special:MyLanguage/Help:Categories|category]] {{#if:{{{2|}}}|are|is}}|Main {{#ifeq:{{NAMESPACE:{{{1}}}}}||article|page}}{{#if:{{{2|}}}|s}}:}} [[Special:MyLanguage/{{{1|{{PAGENAME}}}}}|{{{l1|{{{1|{{PAGENAME}}}}}}}}]]{{#if:{{{2| }}}
+
<noinclude>
 +
<languages/>
 +
</noinclude>{{#switch:
 +
| =
 +
<div role="note" class="rellink relarticle mainarticle">{{#ifeq:{{SUBJECTSPACE}}|Category
 +
|The main {{#ifeq:{{NAMESPACE:{{{1}}}}}||article|page}}{{#if:{{{2|}}}|s}} for this [[Special:MyLanguage/Help:Categories|category]] {{#if:{{{2|}}}|are|is}}
 +
|Main {{#ifeq:{{NAMESPACE:{{{1}}}}}||article|page}}{{#if:{{{2|}}}|s}}:}} [[Special:MyLanguage/{{{1|{{PAGENAME}}}}}|{{{l1|{{{1|{{PAGENAME}}}}}}}}]]{{#if:{{{2| }}}
 
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}[[Special:MyLanguage/{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
 
  |{{#if:{{{3|}}}|,&#32;|&#32;and&#32;}}[[Special:MyLanguage/{{{2}}}|{{{l2|{{{2}}}}}}]]}}{{#if:{{{3|}}}
 
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}[[Special:MyLanguage/{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}}
 
  |{{#if:{{{4|}}}|,&#32;|,&#32;and&#32;}}[[Special:MyLanguage/{{{3}}}|{{{l3|{{{3}}}}}}]]}}{{#if:{{{4|}}}
Line 8: Line 14:
 
  |{{#if:{{{9|}}}|,&#32;|,&#32;and&#32;}}[[Special:MyLanguage/{{{8}}}|{{{l8|{{{8}}}}}}]]}}{{#if:{{{9|}}}
 
  |{{#if:{{{9|}}}|,&#32;|,&#32;and&#32;}}[[Special:MyLanguage/{{{8}}}|{{{l8|{{{8}}}}}}]]}}{{#if:{{{9|}}}
 
  |{{#if:{{{10|}}}|,&#32;|,&#32;and&#32;}}[[Special:MyLanguage/{{{9}}}|{{{l9|{{{9}}}}}}]]}}{{#if:{{{10|}}}
 
  |{{#if:{{{10|}}}|,&#32;|,&#32;and&#32;}}[[Special:MyLanguage/{{{9}}}|{{{l9|{{{9}}}}}}]]}}{{#if:{{{10|}}}
  |, and [[Special:MyLanguage/{{{10}}}|{{{l10|{{{10}}}}}}]]}}{{#if:{{{11| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}</div><noinclude>
+
  |, and [[Special:MyLanguage/{{{10}}}|{{{l10|{{{10}}}}}}]]}}{{#if:{{{11| }}}|&#32; (too many parameters in &#123;&#123;[[Template:main|main]]&#125;&#125;)}}</div>
<languages />
+
| #default=
== Usage ==
+
  {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Main|noshift=1}}
 +
}}<noinclude>
 +
 
 +
== Example ==
 
<pre>
 
<pre>
{{TNT|Main|[[Article 1]]|[[Article 2]]|[[Article Something#3|Article 3]]}}
+
{{Main|Article 1|Article 2|Article Something#3}}
 
</pre>
 
</pre>
{{ {{TNTN|Main}} |[[Article 1]]|[[Article 2]]|[[Article Something#3|Article 3]]}}
+
{{Main|Article 1|Article 2|Article Something#3}}
[[Category:Templates{{translation}}]]
+
 
 +
==Template data==
 +
 
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Page 1",
 +
"description": "Page name of related article",
 +
"type": "wiki-page-name",
 +
"required": true
 +
},
 +
"2": {
 +
"label": "Page 2",
 +
"type": "wiki-page-name"
 +
},
 +
"3": {
 +
"label": "Page 3",
 +
"type": "wiki-page-name"
 +
},
 +
"l1": {
 +
"label": "Label 1",
 +
"description": "Custom label for the link to Page 1",
 +
"type": "string",
 +
"default": "Defaults to the name of Page 1"
 +
},
 +
"l2": {
 +
"label": "Label 2",
 +
"type": "string"
 +
},
 +
"l3": {
 +
"label": "Label 3",
 +
"type": "string"
 +
}
 +
},
 +
"description": "This template is used to display a note directing users to the main article about a subject. This should be used at the top of a section, usually directly below a section heading.",
 +
"paramOrder": [
 +
"1",
 +
"l1",
 +
"2",
 +
"l2",
 +
"3",
 +
"l3"
 +
],
 +
"format": "inline"
 +
}
 +
</templatedata>
 +
 
 +
[[Category:Templates{{#translation:}}]]
 
</noinclude>
 
</noinclude>

Latest revision as of 15:17, 29 May 2019

<languages/> {{#switch: | =

| #default=

 {{#invoke:Template translation|renderTranslatedTemplate|template=Template:Main|noshift=1}}

}}

Example

{{Main|Article 1|Article 2|Article Something#3}}
    main page:  Article 1

Template data

<templatedata> { "params": { "1": { "label": "Page 1", "description": "Page name of related article", "type": "wiki-page-name", "required": true }, "2": { "label": "Page 2", "type": "wiki-page-name" }, "3": { "label": "Page 3", "type": "wiki-page-name" }, "l1": { "label": "Label 1", "description": "Custom label for the link to Page 1", "type": "string", "default": "Defaults to the name of Page 1" }, "l2": { "label": "Label 2", "type": "string" }, "l3": { "label": "Label 3", "type": "string" } }, "description": "This template is used to display a note directing users to the main article about a subject. This should be used at the top of a section, usually directly below a section heading.", "paramOrder": [ "1", "l1", "2", "l2", "3", "l3" ], "format": "inline" } </templatedata>

[[Category:Templates{{#translation:}}]]