User:Johan G/Template:Informative template with preloaded text/doc: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (Extending, while finding bugs...)
mNo edit summary
Line 1: Line 1:
__NOTOC__
<noinclude>{{userpage draft}}</noinclude>__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>.
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>.



Revision as of 17:43, 22 June 2019

This is a draft on a userpage.

Please suggest changes to this draft on the discussion page.

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}}


The following template description is not displayed when the template is inserted in an article.

1

2

{{User:Johan G/Template:Informative template with preloaded text
  | content=
Test
}}


The following template description is not displayed when the template is inserted in an article.

1

2

{{User:Johan G/Template:Informative template with preloaded text|content=Test|link box=Test text}}


The following template description is not displayed when the template is inserted in an article.

1

2

{{User:Johan G/Template:Informative template with preloaded text|User:Johan G/Template:Informative template with preloaded text/doc}}


The following template description is not displayed when the template is inserted in an article.

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.

Related templates