Author: conrad.irwin
Description:
At the moment it is not possible to create a template that substitutes the results of parser functions when substituted and that also works when the template is not substitued.
For example of current status:
Template:X {{<includeonly>subst:</includeonly>#if:{{{1|}}}|1|2}}
{{subst:X}} is transformed into "2" as expected, but
{{X}} generates "{{subst:#if:|1|2}}" - ooops.
This feature can be used to good advantage, and some templates use a conditional around something that subst:s to nothing to warn users that they must substitute the template.
I would like to propose an additional prefix "safesubst:" or words to that effect, which gives the same result in both cases above.
Template:X {{<includeonly>safesubst:</includeonly>#if:{{{1|}}}|1|2}}
{{subst:X}} is transformed into "2", as before
{{X}} generates "2" when it is rendered, as expected, and
{{safesubst:X}} works exactly like {{subst:X}}
Version: unspecified
Severity: enhancement