Jump to content

Template talk:For outline

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Outline/doc)

Lua upgrade?

[edit]

I'm not a fan of the nested-conditional structure of this template, so I've prototyped a Lua version at Module:For outline. It works similarly, but by using loops it's about half as long and should be far easier to maintain. The catch is that the module is ever-so-slightly different: it always checks for the existence of the outline title from the normal page title first, then from the initial-lowercased version. This template is a bit inconsistent about which version it checks first. Is this difference a problem? I can rewrite part of the module to allow for dynamically setting which option's picked first for each title form, but I'd rather not do that if the order's arbitrary. {{Nihiltres |talk |edits}} 00:23, 27 June 2016 (UTC)[reply]

@SMcCandlish: Following up on some projects of mine that went stale for lack of feedback. It looks like you added most of the cases in the wikitext template; would you please comment? :) {{Nihiltres |talk |edits}} 17:09, 24 October 2016 (UTC)[reply]
@Nihiltres: I seem to recall it being based on a general sense of most common to least common variants, though it was not a carefully measured order. Not sure it matters much. There should not be two matches for any topic, in most if not all cases; if there is, then a merge probably needs to happen (an exception that could happen is when a capitalized title and a lower-case one refer to something different, but that would usually also involve a parenthetical disambiguator). As for upper versus lower case, I think any difference in checking order was just a mistake on my part (or a DGaF). The general goal was simply to catch any matching existing page with a sane title.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  20:11, 24 October 2016 (UTC)[reply]
PS: Hope this can be adapted to the related templates. I also note that {{For index}} didn't get created. I may have had a browser crash or something while I was working on it, and forgot to get back to it.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  20:13, 24 October 2016 (UTC)[reply]
OK, great. My main worry was hitting an inappropriately-capitalized redirect; just like in the wikitext version, the module stops the instant it finds an existing title. I'll apply the module to the template and see about converting the related templates (the logic's basically already written, I just need to convert the config). Thanks for the feedback. {{Nihiltres |talk |edits}} 21:48, 24 October 2016 (UTC)[reply]
No prollem.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  05:41, 25 October 2016 (UTC)[reply]