Difference between revisions of "Template:Lessthan/doc"
Jump to navigation
Jump to search
(sl:Predloga:Lessthan) |
imported>Jonesey95 |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{documentation subpage}} | {{documentation subpage}} | ||
| − | This template can be used in place of a literal "<" when the latter would be interpreted as a syntactic marker. In particular, it can be used inside templates meant for subst:ing, together with the < | + | This template can be used in place of a literal "<" when the latter would be interpreted as a syntactic marker. In particular, it can be used inside templates meant for subst:ing, together with the <code><nowiki><includeonly>subst:</includeonly></nowiki></code> trick, to allow the subst:ed output to contain HTML comments that contain other subst:ed templates, [[meta:Help:Parser function|parser functions]] or [[meta:Help:Variable|variables]]. This works even under the [[meta:Migration to the new preprocessor|new parser]], which doesn't otherwise allow code within comments to be evaluated. |
| − | For example, the code "< | + | For example, the code "<code><nowiki>{{<includeonly>subst:</includeonly>lessthan}}!-- {{<includeonly>subst:</includeonly>SITENAME}} --></nowiki></code>" in a template produces "<code><nowiki><!-- Wikipedia --></nowiki></code>" when subst:ed. |
==See also== | ==See also== | ||
| Line 9: | Line 9: | ||
* [[:Template:=]] | * [[:Template:=]] | ||
| − | <includeonly> | + | <includeonly>{{Sandbox other|| |
[[Category:Template namespace templates|{{PAGENAME}}]] | [[Category:Template namespace templates|{{PAGENAME}}]] | ||
[[Category:Mathematical formatting templates|{{PAGENAME}}]] | [[Category:Mathematical formatting templates|{{PAGENAME}}]] | ||
[[sl:Predloga:Lessthan]] | [[sl:Predloga:Lessthan]] | ||
| − | </includeonly> | + | }}</includeonly> |
Latest revision as of 17:51, 3 June 2020
| 40px | This is a documentation subpage for Template:Lessthan. It contains usage information, categories and other content that is not part of the original template page. |
This template can be used in place of a literal "<" when the latter would be interpreted as a syntactic marker. In particular, it can be used inside templates meant for subst:ing, together with the <includeonly>subst:</includeonly> trick, to allow the subst:ed output to contain HTML comments that contain other subst:ed templates, parser functions or variables. This works even under the new parser, which doesn't otherwise allow code within comments to be evaluated.
For example, the code "{{<includeonly>subst:</includeonly>lessthan}}!-- {{<includeonly>subst:</includeonly>SITENAME}} -->" in a template produces "<!-- Wikipedia -->" when subst:ed.
See also