Community Central


How to add a subst warning for subst only templates

If you want to add a warning message on a substitution-only template, when the template has not been substituted, to substitute it, you can do so through the following:

<includeonly>{{subst:</includeonly><includeonly>null|<span style="font-size: large; color: red">'''Have to subst this template.  Replace {{templatenamehere}} with {{subst:templatenamehere}}'''</span>}}</includeonly>

This leaves an ugly line of red-coloured large-sized text stating that you forgot to subst the template "templatenamehere" (replace that string with the name of your template)

This implementation requires the existence of template:null on your wiki of the same implementation as that found at w:c:templates:template:null, so copy that to your wiki. Alternately, you can copy wikipedia:en:template:void instead, and replace the instance of "null" with "void".

If you need instruction on how to copy that template off w:c:templates, please read w:c:templates:Help:How to copy templates to your wiki

ForestMonthZero 10:00, December 21, 2011 (UTC)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki