Template:Documentation subpage: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq:{{SUBPAGENAME}}|doc|
{{#ifeq:{{SUBPAGENAME}}|doc|
<div class="documentation-subpage" style="border: 1px solid #ccc; background-color: #f9f9f9; padding: 1em; margin: 1em 0;">
<div class="documentation-subpage" style="border: 1px solid #ccc; background-color: #f9f9f9; padding: 1em; margin: 1em 0;">
This is the <code>/doc</code> subpage of [[{{BASEPAGENAME}}]]. Any changes made here will reflect on the main template page.
This is the <code>/doc</code> subpage of [[{{#titleparts:{{FULLPAGENAME}}|1}}]]. Any changes made here will reflect on the main template page.
[[Category:Documentation subpages]]
[[Category:{{{cat|Documentation subpages}}}]]
</div>
</div>}}<noinclude>
}}
<templatedata>
{
"params": {
"cat": {
"label": "Category",
"description": "Specifies which category to label the template under.",
"type": "string",
"default": "Documentation subpages",
"suggested": true
},
"1": {
"label": "Base page name",
"description": "If set, overrides the automatically detected base template name (used when this template fails to detect the parent template).",
"type": "string",
"required": false,
"example": "Template:MyTemplate"
}
},
"description": "Used on /doc subpages to display that the current page is a documentation subpage of a template. If no parameter is passed, it defaults to the base name of the current page.",
"paramOrder": [
"1",
"cat"
]
}
</templatedata>
{{Documentation}}


<noinclude>
== Example ==
{{Documentation}}
Below is a working example using a subpage at [[:Template:Documentation subpage/doc]]:
 
<div class="documentation-subpage" style="border: 1px solid #ccc; background-color: #f9f9f9; padding: 1em; margin: 1em 0;">
This is the <code>/doc</code> subpage of [[:Template:Documentation subpage]]. Any changes made here will reflect on the main template page.</div>
[[Category:Documentation templates]]
[[Category:Documentation templates]]
[[Category:Templates with parameters (optional)]]
</noinclude>
</noinclude>
contributors, delete_pages, Interface administrators
4,701

edits