Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Always substitute: Difference between revisions

Template page
Content deleted Content added
m 1 revision imported: For 2112
m Dummy Edit: Accidentally pressed 'Enter' while typing edit summary. The last statement should've said, "the boolean conditions for 'auto' and 'nocat' now consistently default to "no" when set to a non-true string.
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{{{{|safesubst:}}}#invoke:Unsubst|main|$B=
{{{{{|safesubst:}}}#invoke:Unsubst|main|$B=
{{Ombox
{{Ombox
| style = text-align: center;
| name = Subst only
| type = notice
| name = Subst only
| type = notice
| text = '''This template {{#switch:{{{yesnomaybe|}}}|may=may be [[Help:Substitution|substituted]]'''|never=should ''not'' be [[Help:Substitution|substituted]]'''||#default=should always be [[Help:Substitution|substituted]]''' (i.e., use <!--
| text = This template <strong>{{#switch:{{lc:{{{yesnomaybe|}}}}}|can|may={{lc:{{{yesnomaybe}}}}} be [[Help:Substitution|substituted]]</strong> by using <!--
-->{{{actualtemplate|{{template other|{{Tlsp|code=yes|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{BASEPAGENAME}}|{{PAGENAME}}}}}}|{{Tlsu|code=yes|{{FULLPAGENAME}}}}}}}}})}}. <!--
--><strong>{{{actualtemplate|{{template other|{{Tls|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{BASEPAGENAME}}|#default={{PAGENAME}}}}}}|{{Tlsu|{{FULLPAGENAME}}}}}}}}}</strong><!--
-->{{#if:{{yesno|{{{auto|no}}}}} |Any accidental transclusions will be automatically substituted by a bot.{{{1|}}}{{#if:{{yesno|{{{nocat|}}}}}|<!--no categorization-->|{{#switch:{{SUBPAGENAME}}|doc|sandbox=|[[Category:Wikipedia templates to be automatically substituted]]}}}}}} <!--
-->|not|never=should <em>{{lc:{{{yesnomaybe}}}}}</em> be [[Help:Substitution|substituted]]</strong> – use <!--
-->{{#if:{{{alt|}}} |For transcluding, use {{Tl|{{{alt|}}}}} instead.}}
}}{{#if:{{yesno|{{{nocat|<noinclude>true</noinclude>}}}}}|<!--no categorization-->|{{#switch:{{SUBPAGENAME}}|doc|sandbox=|{{#switch:{{{yesnomaybe|}}}
--><strong>{{{actualtemplate|{{template other|{{Tl|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{BASEPAGENAME}}|#default={{PAGENAME}}}}}}|{{Tlu|{{FULLPAGENAME}}}}}}}}}</strong><!--
-->|#default=should <em>always</em> be [[Help:Substitution|substituted]]</strong> – use <!--
|never=[[Category:Wikipedia never-substituted templates]]
--><strong>{{{actualtemplate|{{template other|{{Tls|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{BASEPAGENAME}}|#default=<includeonly>{{PAGENAME}}</includeonly><noinclude>Example</noinclude>}}}}|{{Tlsu|{{FULLPAGENAME}}}}}}}}}</strong>}}. <!--
|#default=[[Category:Wikipedia substituted templates]]
-->{{#ifeq:{{yesno-no|{{{auto|}}}}}|yes|{{#switch:{{lc:{{{yesnomaybe|}}}}}|can|may|not|never=|#default=Any accidental transclusions will be automatically substituted by a bot.{{{1|}}}{{#ifeq:{{yesno-no|{{{nocat|<noinclude>true</noinclude>}}}}}|yes|<!--no categorization-->|{{#switch:{{SUBPAGENAME}}|doc|sandbox=|#default=[[Category:Wikipedia templates to be automatically substituted]]}}}}}}}} <!--
}}}}}}}}<includeonly>__EXPECTUNUSEDTEMPLATE__</includeonly><noinclude>{{Documentation}}</noinclude>

-->{{#if:{{{alt|}}}|{{#switch:{{lc:{{{yesnomaybe|}}}}}|can|may|not|never=|#default={{#ifeq:{{{auto|}}}|yes|<br/>}}For [[Help:Transclusion|transclusion]], use <strong>{{#ifeq:{{NAMESPACE:{{{alt}}}}}|Template|&#123;&#123;[[{{{alt}}}|{{PAGENAME:{{{alt}}}}}]]&#125;&#125;|{{Tlg|{{{alt}}}}}}}</strong> instead.}}}}
}}{{#ifeq:{{yesno-no|{{{nocat|<noinclude>true</noinclude>}}}}}|yes|<!--no categorization-->|{{#switch:{{SUBPAGENAME}}|doc|sandbox=|#default={{#switch:{{lc:{{{yesnomaybe|}}}}}
|not|never=[[Category:Wikipedia never-substituted templates]]
|can|may=<!--No applicable category-->
|#default=[[Category:Wikipedia substituted templates]]{{#ifexpr: 0{{Find page text |text=<!%-%- *{{NAMESPACE}}:[{{lc:{{str left|{{Lua escape|{{{1|{{PAGENAME}}}}}}}|1}}}}{{uc:{{str left|{{Lua escape|{{{1|{{PAGENAME}}}}}}}|1}}}}]{{str right|{{Lua escape|{{{1|{{PAGENAME}}}}}}}|1}} *%-%-> |title={{FULLPAGENAME}} |plain=f}} > 0 | [[Category:Templates with matching hidden id]]}}
}}}}}}}}<includeonly>__EXPECTUNUSEDTEMPLATE__</includeonly><noinclude>
{{Documentation}}
</noinclude>

Latest revision as of 05:25, 13 August 2026