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

  • 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
title,
author etc.
<pages index=… from=… to=… />
==References==
<references/>

[[Category:…]]

==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>.


so

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

  • Who would benefit: All wikis. Most important for Wikisource
  • More comments:
  • Phabricator tickets:
  • Proposer: Draco flavus (talk) 14:35, 17 January 2022 (UTC)Reply[reply]