Difference between revisions of "Template:Lessthan/doc"

From blackwiki
Jump to navigation Jump to search
(sl:Predloga:Lessthan)
imported>Vanisaac
m (clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
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>

Revision as of 23:51, 25 April 2020

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