User:Johan G/Template:Informative template with preloaded text/doc: Difference between revisions
m (Defaults to FULLPAGENAME not BASEPAGENAME) |
m (Extending, while finding bugs...) |
||
Line 1: | Line 1: | ||
This template can be used to document a wiki template and to | __NOTOC__ | ||
This template can be used to document a wiki template and put the documentation on a separate page, typically a subpage to the template named <code>/doc</code>. | |||
If the template is put on a page without a <code>/doc</code> subpage, or no link is given to a subpage with documentation, you can click on a link labeled "Create documentation" to load a new page with a skeleton for writing the template documentation. | |||
== Usage == | == Usage == | ||
Line 18: | Line 21: | ||
: Will add content to the link box at the bottom | : Will add content to the link box at the bottom | ||
== Examples == | == Examples == | ||
{{obr}}User:Johan G/Template:Informative template with preloaded text{{cbr}} | |||
{{User:Johan G/Template:Informative template with preloaded text}} | |||
{{obr}}User:Johan G/Template:Informative template with preloaded text | |||
{{!}} content= | |||
Test | |||
{{cbr}} | |||
{{User:Johan G/Template:Informative template with preloaded text | |||
| content= | |||
Test | |||
}} | |||
{{obr}}User:Johan G/Template:Informative template with preloaded text{{!}}content=Test{{!}}link box=Test text{{cbr}} | |||
{{User:Johan G/Template:Informative template with preloaded text|content=Test|link box=Test text}} | |||
{{obr}}User:Johan G/Template:Informative template with preloaded text{{!}}User:Johan G/Template:Informative template with preloaded text/doc{{cbr}} | |||
{{User:Johan G/Template:Informative template with preloaded text|User:Johan G/Template:Informative template with preloaded text/doc}} | |||
== Technical details == | == Technical details == | ||
When creating a template with the "Create documentation" link, the new page is preloaded from [[User:Johan G/Template:Informative template with preloaded text/preloaded text]]. | |||
== Known issues == | == Known issues == | ||
This template is still under development. | |||
== Related templates == | == Related templates == | ||
* {{tl|informative template}} | * {{tl|informative template}} | ||
Revision as of 17:40, 22 June 2019
This template can be used to document a wiki template and put the documentation on a separate page, typically a subpage to the template named /doc
.
If the template is put on a page without a /doc
subpage, or no link is given to a subpage with documentation, you can click on a link labeled "Create documentation" to load a new page with a skeleton for writing the template documentation.
Usage
The template is used with one variable and must be put between <noinclude></noinclude> tags.
Note Please put the <noinclude> tag right behind the intended contents of the template, as an empty line or extra spaces will alter the way the template is rendered.
{{User:Johan G/Template:Informative template with preloaded text|documentation page |content=|link box=}}
- documentation page
- Name of page with documentation
- Defaults to
{{FULLPAGENAME}}/doc
- content
- Will allow wiki markup to be used instead of a separate documentation page.
- link box
- Will add content to the link box at the bottom
Examples
{{User:Johan G/Template:Informative template with preloaded text}}
1
2
{{User:Johan G/Template:Informative template with preloaded text | content= Test }}
1
2
{{User:Johan G/Template:Informative template with preloaded text|content=Test|link box=Test text}}
1
2
{{User:Johan G/Template:Informative template with preloaded text|User:Johan G/Template:Informative template with preloaded text/doc}}
1
Template documentation34
User:Johan G/Template:Informative template with preloaded text/doc User:Johan G/Template:Informative template with preloaded text/doc/doc
The above documentation is transcluded from User:Johan G/Template:Informative template with preloaded text/doc/doc. (Edit | History)562
Technical details
When creating a template with the "Create documentation" link, the new page is preloaded from User:Johan G/Template:Informative template with preloaded text/preloaded text.
Known issues
This template is still under development.