Template:Reflistp
Although this template is still somewhat experimental, it will not do major damage if used but may slow down page rendering time somewhat.
The purpose is to alleviate the inconvenience and mild irritation caused by the difficulty in verifying the way new and changed references will display when editing sections of an article. Editors often accomplish this by temporarily adding a {{Reflist}} template while they are editing, intending to remove it before saving their changes.
This template is meant to be used in the same way, but contains code to prevent displaying the {{Reflist}}
output unless the article is in edit preview mode.
The template should still be removed before changes are saved, but will normally be less disruptive to the article if inadvertently left in place.
Any subsequent editor finding this template in an article should feel free to remove it as being an error. (In odd cases, a <!-- hidden comment --> can be used to request this not be done.)
If the section is saved with the template accidentally left on it, there will be a hidden comment added to aid in the location of the section. To show this section, you may style it however you like and it has a class="bad-reflist"
and a default style="display: none;"
.
Also if the section is saved with the template accidentally left on it, the page will be added to Category:Pages with a transclusion of Template:Reflistp that should be removed (0).
Note that {{Reflistp}} may be added to the end of multiple sections if it's anticipated that editing will bounce around among sections.
To prevent the presence of {{Reflistp}} in one or more article sections from affecting the appearance of full-article previews (i.e. previews obtained during an edit of the full article, as opposed to previews obtained during section edits), add an additional instance of {{Reflistp}} at the very top of the article (or, more accurately, anywhere before the first occurrence of any ref or cite or whatever). For technical reasons too complex to explain hereTemplate:Clarification needed this causes all instances of {{Reflistp}} to output nothing during a full-article preview, yet output the refs for an individual section during an edit of that section.