Difference between revisions of Template:Divbox/doc

Viceroy Sam (talk | contribs)
See also: not here
Viceroy Sam (talk | contribs)
Line 110: Line 110:


== Using subst: with this template ==
== Using subst: with this template ==
{{Update|inaccurate=yes|date=May 2020|reason='''substing the current version leaves behind if statements, category checks, and other undesirable code'''}}
The <code>subst:</code> atom may be used with {{tl|divbox}}. ''This may be highly desirable.'' Note that <code>subst:</code> does not take effect in preview, but only after saving a page. The template's inclusion is replaced by the code of the template itself, which will continue to write the box as before, but without an additional server call.  
The <code>subst:</code> atom may be used with {{tl|divbox}}. ''This may be highly desirable.'' Note that <code>subst:</code> does not take effect in preview, but only after saving a page. The template's inclusion is replaced by the code of the template itself, which will continue to write the box as before, but without an additional server call.  


Line 117: Line 116:
Just paste in your content and, when you're finished, be sure to close the template call with <code><nowiki>}}</nowiki></code>.
Just paste in your content and, when you're finished, be sure to close the template call with <code><nowiki>}}</nowiki></code>.


Since the contents are given in the form of two parameter values, for the content you may place within {{tl|divbox}}, the [[m:Help:Template#Restrictions_on_parameter_values|restrictions on parameter values]] apply. For example, if you put content that includes template calls, {{tl|divbox}} cannot tell where its last parameter ends.
Since the contents are given in the form of two parameter values, for the content you may place within {{tl|divbox}}, the restrictions on parameter values apply. For example, if you put content that includes template calls, {{tl|divbox}} cannot tell where its last parameter ends.


If the contents do not satisfy the restrictions, insert this code in your page first:  
If the contents do not satisfy the restrictions, insert this code in your page first: