Template:Sleep apnea
From W8MD weight loss and sleep centers
Template documentation
No documentation subpage exists yet.
You can create documentation for this template at Template:Sleep apnea/doc.
Suggested documentation sections: *== Usage ==*== Parameters ==*== Examples ==*== See also ==*<includeonly>[[Category:Templates]]</includeonly>
Documentation helper template for displaying template documentation subpages
Template:Documentation is a helper template used on template pages to display documentation from a separate documentation subpage, usually named /doc.
This follows the common MediaWiki pattern of keeping template code separate from explanatory documentation. MediaWiki templates are transcluded using double braces, and documentation subpages make it easier to protect or maintain template code while still allowing usage notes, examples, and categories to be edited separately.
Usage
Place this at the bottom of a template page, outside the active template code:
<noinclude>
{{Documentation}}
</noinclude>
A typical template page should look like this:
<includeonly>
Template code goes here.
</includeonly><noinclude>
{{Documentation}}
</noinclude>
Custom documentation page
By default, this template transcludes documentation from:
{{FULLPAGENAME}}/doc
You can also specify a custom documentation page:
{{Documentation|Template:Example/doc}}
Recommended /doc page structure
A good documentation subpage usually includes:
== Usage == == Parameters == == Examples == == See also == <includeonly> [[Category:Templates]] </includeonly>
Why use documentation subpages?
Documentation subpages are useful because they:
- Keep template code clean and easier to maintain.
- Allow categories to be placed on the documentation page instead of inside active template code.
- Allow usage examples and parameter explanations without affecting template output.
- Make protected templates easier to document.
- Reduce accidental edits to working template code.
Notes
- Add template categories to the
/docpage, not the main template page. - Place categories inside
<includeonly>...</includeonly>on the documentation page. - Use
<noinclude>{{Documentation}}</noinclude>at the bottom of templates. - Use
<nowiki>...</nowiki>or<pre>...</pre>when showing template code examples.
See also
- Template:Infobox public health
- Template:Cite web
- Template:Cite journal
- Help:Template
- Help:Transclusion
Usage
This template is a navigation box for articles related to sleep apnea, obstructive sleep apnea, sleep medicine, CPAP, home sleep testing, PAP therapy, weight loss, obesity, and W8MD sleep apnea resources.
{{Sleep apnea}}
Collapsed state:
{{Sleep apnea|state=collapsed}}
Expanded state:
{{Sleep apnea|state=expanded}}
