Template:Documentation: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[checked revision][checked revision]
Content added Content deleted
(support multiple "transcluded from" items)
m (adjust newline)
Line 2: Line 2:
|
|
= Template documentation =
= Template documentation =
''Transcluded from {{#if:{{{1|}}} | {{#invoke:Link list|listPages}} | [[{{FULLPAGENAME}}/doc]]}}''
''Transcluded from [[{{{1|{{FULLPAGENAME}}/doc}}}]]''

{{{content|{{ {{PAGENAME}}/doc }}}}}
{{{2|{{ {{PAGENAME}}/doc }}}}}
|}
|}

Revision as of 20:54, 18 June 2024

Template documentation

Transcluded from Template:Documentation/doc

This template is meant to be included in a <noinclude> block at the end of a template with documentation located in the /doc subpage. This subpage is then transcluded inside a green box in the template page, as with this very text, when read from the main template page. One can use different content by setting the content argument. If there are positional arguments present, these will be used to form a list in the transcluded from notice, rather than the default /doc subpage. For example:

{{Documentation|Template:Documentation page/doc|Template:Redirect page/doc|content=
== Documentation page documentation ==
{{Documentation page/doc}}
== Redirect page documentation ==
{{Redirect page/doc}}
}}

Will produce:

Template documentation

Transcluded from Template:Documentation page/doc

Template:Redirect page/doc