Difference between revisions of "Template:Clade example/doc"
Jump to navigation
Jump to search
imported>Jts1882 (create with explanation of intent behind template) |
imported>Jts1882 (add example of intended result) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
| − | + | {| class="wikitable" style="float:right" | |
| + | !Template code | ||
| + | !Resulting output | ||
| + | |- | ||
| + | |<pre>{{clade | ||
| + | |label1=label | ||
| + | |1={{clade | ||
| + | |1=leaf1 | ||
| + | |2=leaf2 | ||
| + | }} | ||
| + | }}</pre> | ||
| + | |{{clade | ||
| + | |label1=label | ||
| + | |1={{clade |1=leaf1 |2=leaf2 }} | ||
| + | }} | ||
| + | |} | ||
The goal of this template was to display example code and executed results in a table. This was to make writing the documentation easier and avoid the need for repeating the code twice, once enclosed in the pre tag and once without. | The goal of this template was to display example code and executed results in a table. This was to make writing the documentation easier and avoid the need for repeating the code twice, once enclosed in the pre tag and once without. | ||
Unfortunately the attempt was unsuccessful. Parameters are transcluded when used unless in certain tags (pre, nowiki). One idea was to stip the tags from a transclusion protected parameter using the Lua module, but code wrapped in pre tags isn't passed to the module. Instead it passes a [https://www.mediawiki.org/wiki/Strip_marker strip marker]. | Unfortunately the attempt was unsuccessful. Parameters are transcluded when used unless in certain tags (pre, nowiki). One idea was to stip the tags from a transclusion protected parameter using the Lua module, but code wrapped in pre tags isn't passed to the module. Instead it passes a [https://www.mediawiki.org/wiki/Strip_marker strip marker]. | ||
| + | {{clear}} | ||
== Usage == | == Usage == | ||
Revision as of 09:08, 4 August 2018
| This is a documentation subpage for Template:Clade example. It contains usage information, categories and other content that is not part of the original template page. |
| Template code | Resulting output | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
{{clade
|label1=label
|1={{clade
|1=leaf1
|2=leaf2
}}
}}
|
|
The goal of this template was to display example code and executed results in a table. This was to make writing the documentation easier and avoid the need for repeating the code twice, once enclosed in the pre tag and once without.
Unfortunately the attempt was unsuccessful. Parameters are transcluded when used unless in certain tags (pre, nowiki). One idea was to stip the tags from a transclusion protected parameter using the Lua module, but code wrapped in pre tags isn't passed to the module. Instead it passes a strip marker.