Difference between revisions of "Template:Lessthan"

From blackwiki
Jump to navigation Jump to search
imported>Ais523
m (Protected Template:Lessthan: high-risk [edit=sysop:move=sysop])
imported>RockMFR
(moved to /doc)
Line 1: Line 1:
 
<<noinclude>
 
<<noinclude>
 
+
{{pp-template|small=yes}}
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 <tt><nowiki><includeonly>subst:</includeonly></nowiki></tt> trick, to allow the subst:ed output to contain HTML comments that contain other subst:ed templates, [[meta:parser functions|parser functions]] or [[meta:variables|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.
+
{{documentation}}
 
 
For example, the code "<tt><nowiki>{{<includeonly>subst:</includeonly>lessthan}}!-- {{<includeonly>subst:</includeonly>SITENAME}} --></nowiki></tt>" in a template produces "<tt><nowiki><!-- Wikipedia --></nowiki></tt>" when subst:ed.
 
 
 
==See also==
 
* [[:Template:((]]
 
* [[:Template:))]]
 
* [[:Template:=]]
 
[[Category:Template namespace templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 17:14, 14 May 2008

<

Template documentation[view] [edit] [history] [purge]

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

sl:Predloga:Lessthan