Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2473fcb19c1d806

Jump to content

Template talk:Wikipedia Library access

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Wikipedia Library access/doc)
Latest comment: 7 months ago by Username in topic Code review please?

Feedback on the template

[edit]

In order to bring the template to the attention of the wider community and invite feedback and discussion, I've posted notices at Wikipedia talk:The Wikipedia Library, Wikipedia talk:WikiProject Templates, Wikipedia talk:Citation templates and Wikipedia:Village pump (miscellaneous). Pineapple Storage (talk) 18:47, 24 July 2025 (UTC)Reply

Section 'New(-ish) Wikipedia Library access template' not found

Discussion at Wikipedia:Village pump (miscellaneous)

[edit]
Just a note to draw people's attention to a template I created recently: Template:Wikipedia Library access (alias TM:Twlac). I created it as a way to avoid the hassle involved in manually checking whether or not TWL has access to a particular source.
The idea is that regular (non-TWL) URLs and DOIs should be used in citations, to ensure that readers who don't have access to TWL (ie. the vast majority of readers) can access the ordinary link; this new template could then be tagged on to the end of the citation to direct any future editors with TWL access to an accessible version of the source. The template can take a URL, a DOI, or a JSTOR ID, and converts the input into TWL link format.
MarkupRenders as
{{#parsoid
(See the documentation for further examples.)
I have very little prior experience of making or editing templates, so I'm very open to feedback and contributions to any aspects of the template that need improvement/could be made more efficient/etc.
On a broader scale, I'm interested to hear people's thoughts on the template's suitability for being included in mainspace articles, as opposed to just on talk/project pages for instance. Given that such a tiny proportion of readers could make use of the link, is it actually beneficial to add this template to mainspace citations, or would it just confuse/distract readers? Should a feature be added to the template so that it only displays for auto- or extended-confirmed users—ie. the users for whom the template is most likely to be relevant? Or should the template be limited to use in non-article namespaces such as talk pages?
If anyone has any thoughts on these issues, or on any other aspect of the template, please feel free to share them on the template's talk page; I'm really keen to get an idea of the community's views on this! Thank you in advance! :) Pineapple Storage (talk) 18:47, 24 July 2025 (UTC)Reply
Please see also the discussion at Wikipedia talk:WikiProject Templates#New(-ish) Wikipedia Library access template. Pineapple Storage (talk) 08:39, 26 July 2025 (UTC)Reply
How would this work when a particular source withdraws from the arrangement, as has happened not infrequently? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:16, 26 July 2025 (UTC)Reply
Interesting! Unless there's something I'm missing, I think all that would happen is that the URL would then just take you to the regular source page, which would say "Log in through your institution" (or similar) where before it would have said "Download PDF"/"Read full text" etc. For example, this book is not available via TWL, but the template still generates a usable output:
MarkupRenders as
{{twlac|doi=10.4324/9781315675541}}
ie. a TWL-formatted link that doesn't actually provide TWL access. I think the only solution for this would be to remove this template from the citation whenever a non-functioning/expired version is found, because if TWL doesn't provide access then this template would just be a duplication of (eg.) the |url= parameter in a citation template, so it doesn't add any value.
Alternatively, a function similar to |url-status=deviated could be added (maybe using the existing |2=/|access= parameter), so that if a source stops being available you can edit the template to indicate this (eg. |access=expired) and the template then won't display at all, but there would still be a record in the wikitext that the source was originally accessed through TWL. (I'm not sure in what context that information would be useful/necessary, but it's still a possibility.) Pineapple Storage (talk) 12:02, 26 July 2025 (UTC)Reply
If there is otherwise consensus for something of this nature, then I do not see expiring TWL partners as a deal-breaker. We have an analogous situation with interlanguage links created by use of Template:Ill: when someone creates a page at en-wiki that is the target of {{ill}}, the wikilink goes blue and the template is no longer needed, and Cewbot task #1 finds them and converts them to plain wikilinks. A bot task modeled on Cewbot could be created to convert your template in the same manner, after a partner was no longer on board. Mathglot (talk) 16:36, 26 July 2025 (UTC)Reply

Village pump discussion follow-up

[edit]

Just a note regarding the point raised by @Pigsonthewing at the recent village pump discussion about this template. To complement the "No access" option I added last week, I've now also added an optional date parameter which appends "as of [date]" to the access note. (See documentation for fuller explanation and examples.)

This won't eliminate the possibility of TWL links expiring/going out of date if TWL loses access to a provider, but it should at least provide some warning to users; transclusions with older dates could be checked, and then changed to |access=none (with a more current date) if the TWL link no longer works.

Does this go some way to solving the potential issue with ageing links? I'm very open to further suggestions either way. Pineapple Storage (talk) 16:32, 12 August 2025 (UTC)Reply

Code review please?

[edit]

I just attempted to add a reference to a Haaretz article and was unsuccessful; could you please review my syntax?

Full access available to users of The Wikipedia Library as of November 2025.

Thanks! User:Eulersidentity (talk) 01:23, 22 November 2025 (UTC)Reply

@Eulersidentity: You are missing the url= before the URL. Try:
In fact, it might be better to link to the finalised article rather than the live/rolling news one:
Cheers, SunloungerFrog (talk) 06:26, 5 December 2025 (UTC)Reply
Thank you!! User:Eulersidentity (talk) 16:38, 16 December 2025 (UTC)Reply

Take identifier from immediately preceding citation?

[edit]

First of all, @Pineapple Storage, heartiest thanks for making this excellent template, which works brilliantly on the couple of articles I've used it in. It is so much easier than cut'n'pasting identifiers to the right bit of TWL, and really helps for easy WP:V checks. I would love to see the various {{cite}} templates include it natively somehow, but I guess that might be a longer term endeavour. In lieu of that, I wonder whether it might be possible to have a way of taking the identifier from an immediately preceding cite template. For example, I often do something like this:

* {{cite journal |last1=Hinsch |first1=Bret |title=The Genre of Women's Biographies in Imperial China |journal=Nan Nü |date=2009 |volume=11 |issue=1 |pages=102–123 |doi=10.1163/138768009X12454916571841}} {{twlac|doi=10.1163/138768009X12454916571841}}

To get:

  • Hinsch, Bret (2009). "The Genre of Women's Biographies in Imperial China". Nan Nü. 11 (1): 102–123. doi:10.1163/138768009X12454916571841. Full access available to users of The Wikipedia Library.

And it would be nice to be able to avoid cut'n'pasting the identifier, but rather have {{twlac}} grab it from the previous template, using something shorter like {{twlac|doi}} or {{twlac|id=doi}}, (same for jstor, gale, url, etc.)

I would also support a short option, per ARandomName123 above. Again, many thanks! Cheers, SunloungerFrog (talk) 07:08, 5 December 2025 (UTC)Reply