Template:Template doc page transcluded/doc
Appearance
This is a documentation subpage for Template:Terminate sentence It contains usage information, categories and other content that is not part of the original template page. |
Usage
[eedit soorce]Assuming you have your template at "Template:name", and you want to make a separate template documentation subpage that you will transclude in your template:
- You create "Template:name/doc" with your documentation (the standardized subpage /doc is required because all doc-related templates use it as default), and you place at its top:
<includeonly>{{Template doc page transcluded}}</includeonly>
- If you need to also transclude your "Template:name/doc" into other pages than "Template:name", you will need to provide the original base page name so that "edit" links can find their way back to it:
<includeonly>{{Template doc page transcluded|Template:name}}</includeonly>
Test cases
[eedit soorce]If subpages named /sandbox and /testcases exist, this template generates links to them. See Wikipedia:Template test cases for more detail.
CSS
[eedit soorce]Since there is some duplication with links provided by Template:template doc (backlinks, edit), and not all users need the explanation provided, this template has id="template_doc_page_transcluded", so that with CSS one can specify not to display it.
See also
[eedit soorce]- the companion template {{Template doc page viewed directly}}
- the companion sample template {{sample}}
- {{Interwiki doc page pattern}} which when substed, creates boilerplate text for a /doc page including the proper calls to the other two.
- Note: All four add tagged pages properly to Category:Template documentation