Template:Template documentation/doc: Difference between revisions
Content added Content deleted
mNo edit summary |
mNo edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1:
<onlyinclude>The template <span style="font-family:"Consolas", monospace;">{{[[Template:Template documentation|Template documentation]]}}</span> calls subroutine doc from [[Module:Template documentation|Module Template documentation]]. It implements a template documentation that updates automatically when the template is edited.
== Documentation subpage==
Insert following text into the documentation subpage and fill in the parameters
<pre><nowiki>{{#invoke:Template documentation|dokuseite}}
<onlyinclude>
{{#invoke:Template documentation|doku
|p1=1|t1=|d1=|m1=|f1=<!-- p: name of parameter; t: description; d: default; m: m=1 when mandatory; f=following line; g=another following line -->
|p2=2|t2=|d2=|m2=|f2=
|count=<!-- number of parameters -->
|omp=<!-- add when should not rendered without params -->
|text=is missing description <!-- add description here -->
|aw1=<!-- add example 1, params seperated by , oder ; change the with trennzeichen=* -->
|rubrik= <!-- add the group name = name of template that creates group list -->
|tabwidth=
|descwidth=
|namewidth=
|defwidth=
|mandwidth=
|norender=
|noexpand=}}</onlyinclude</nowiki>></pre>
== Documentation preload page ==
Create a [[Template:Template documentation/preload-doc|preload page]] with following content
<pre><nowiki>
<includeonly><onlyinclude>{{#invoke:Template documentation|dokuseite}}
<onlyinclude<noinclude />>
{{#invoke:Template documentation|doku
|p1=1|t1=|d1=|m1=|f1=<!-- p: name of parameter; t: description; d: default; m: m=1 when mandatory; f=following line; g=another following line -->
|p2=2|t2=|d2=|m2=|f2=
|count=<!-- number of parameters -->
|omp=<!-- add when should not rendered without params -->
|text=is missing despreption <!-- add description here -->
|aw1=<!-- add example 1, params seperated by , oder ; change the with trennzeichen=* -->
|rubrik= <!-- add the group name = name of template that creates group list -->
|tabwidth=
|descwidth=
|namewidth=
|defwidth=
|mandwidth=
|norender=
|noexpand=}}</onlyinclude<noinclude />></onlyinclude></includeonly>
<div style="background-color: #aaa;width:90%; border-radius: 1em; box-shadow: 0.1em 0.1em 0.5em rgba(0,0,0,0.75);;padding:0.5em;"><div style="background-color: #fff;padding:1em; border-radius: 0.5em;"><code style="white-space:pre-wrap">{{msgnw:Template:Template documentation/preload-doc}}
</code></div></div>
</nowiki></pre>
</onlyinclude>
<noinclude>__NOEDITSECTION__</noinclude>
|
Latest revision as of 08:58, 25 January 2021
The template {{Template documentation}} calls subroutine doc from Module Template documentation. It implements a template documentation that updates automatically when the template is edited.
Documentation subpage
Insert following text into the documentation subpage and fill in the parameters
{{#invoke:Template documentation|dokuseite}} <onlyinclude> {{#invoke:Template documentation|doku |p1=1|t1=|d1=|m1=|f1=<!-- p: name of parameter; t: description; d: default; m: m=1 when mandatory; f=following line; g=another following line --> |p2=2|t2=|d2=|m2=|f2= |count=<!-- number of parameters --> |omp=<!-- add when should not rendered without params --> |text=is missing description <!-- add description here --> |aw1=<!-- add example 1, params seperated by , oder ; change the with trennzeichen=* --> |rubrik= <!-- add the group name = name of template that creates group list --> |tabwidth= |descwidth= |namewidth= |defwidth= |mandwidth= |norender= |noexpand=}}</onlyinclude>
Documentation preload page
Create a preload page with following content
<includeonly><onlyinclude>{{#invoke:Template documentation|dokuseite}} <onlyinclude<noinclude />> {{#invoke:Template documentation|doku |p1=1|t1=|d1=|m1=|f1=<!-- p: name of parameter; t: description; d: default; m: m=1 when mandatory; f=following line; g=another following line --> |p2=2|t2=|d2=|m2=|f2= |count=<!-- number of parameters --> |omp=<!-- add when should not rendered without params --> |text=is missing despreption <!-- add description here --> |aw1=<!-- add example 1, params seperated by , oder ; change the with trennzeichen=* --> |rubrik= <!-- add the group name = name of template that creates group list --> |tabwidth= |descwidth= |namewidth= |defwidth= |mandwidth= |norender= |noexpand=}}</onlyinclude<noinclude />></onlyinclude></includeonly> <div style="background-color: #aaa;width:90%; border-radius: 1em; box-shadow: 0.1em 0.1em 0.5em rgba(0,0,0,0.75);;padding:0.5em;"><div style="background-color: #fff;padding:1em; border-radius: 0.5em;"><code style="white-space:pre-wrap">{{msgnw:Template:Template documentation/preload-doc}} </code></div></div>