Community Wishlist Survey 2022/Citations/Cite extension enhancement/Proposal

From Meta, a Wikimedia project coordination wiki
  • Problem: I would need a way to control the visibility of text depending on whether the <reference group=… /> yields an empty list or some references are in the buffer.

On Wikisource the typical pages in the main space are rather very short themselves however they transclude a huge chunk of text.

Some information about the
author etc.
<pages index=… from=… to=… />


==References== ⏎ <references/> (or a simillar template) is however desirable if and only if the there is some output. On the other hand a bare references list does not look neatly without a proceeding headline.
Changes in the trancluded pages can make the references section necessary or superfluous. On the other hand due to the work flow it is not always clear in advance whether the section will be required or not. The third reason is when preparing a series of pages (chapters of a book), it is desirable to make them automatically only adjusting the page numbers in the <pages ...> tag.

  • Proposed solution: an additional parser hook for the cite extension. Let us call it <refEmpty>.


<refEmpty group=ABC >==References== ⏎ <references/></refEmpty>
would hide the content when the references buffer is empty or show it if required.