Wikipedia:LoPbN index-template generation
From Wikipedia, the free encyclopedia
Contents |
[edit] Revision
Gosh, a year gone by.
I'm about to obsolete what i wrote before, without finishing it, and while the old procedure was necessary at one point and was tolerable even after that, it looks like it can be phased out. More will follow soon.
--Jerzy•t 07:08, 20 November 2006 (UTC)
[edit] Unfinished Original Version
[edit] Purpose of This Page
This page has been created as a first step toward a longer and more formal one. The initial need is to satisfy a substantial number of references, from comments within templates, that will be appearing. The text inside the comments will read something like
- The wiki-markup on this Template:List of people ... Links page is normally neither "hand coded" nor modified "by hand"
- -- even though such replacement or modification is acceptable.
- Further information appears at Wikipedia: LoPbN index-template generation.
- (This comment *also* appears on Template talk:List of people ... Links pages (note the "talk" in the name-space specification), which *require* hand modification.)
- (In most places where it appears, this comment is "inherited" from Template:Lopbn-lz or Template:Lopbn-lrngz.)
Of course what renders here as links will there be rendered (at all) only when editing the corresponding pages, and of course rendered only as lk markup.
[edit] Procedure for Modifying Template-generating Markup in support of Division of an LoPbN Page
At this point, it may suffice to say, beyond that, that
- for each so-called "[[Template:List of people ... Links]] page" that now contains such a comment (the real name may be Template:List of people Al Links, and that example will be assumed in the remainder of the following discussion of editing), its corresponding page in the Template talk: namespace (e.g. Template talk:List of people Al Links) also now exists and has a specific format.
- The plan is, instead of, e.g., Template:List of people Al Links's markup being hand coded or even hand edited, for those with the patience and interest to read this to make changes by the following process:
- Lk to Template talk:List of people Al Links
- Inspect the last horizontal-line-delimited portion of the page, comparing the links there to the links on the corresponding template page. (If they don't match, fixing that is slightly beyond the initial scope of this WP: page.) The reason for changing the template: page will normally be to subdivide some main-namespace LoPbN-tree page, lk'd from the template: page, replacing the LoPbN-tree page with two or more pages whose collective scope matches the existing page's scope. In such normal cases, the existing page's scope will always be an explicit range like that of List of people by name: Alf-Alk, which covers names beginning "Alf...", "Alg...", "Alh...", "Ali...", "Alj...", or "Alk...". (That page is likely to stay a useful example because it is unlikely to soon disappear by split, but a concerted effort to list names like "al-Fayed" and "al-Tikriti" under both Alf and F (and so on), could in practice justify a split.) A split of Alf-Alk could be (especially on the short term, when the Alfonso names could be the first to crowd the others), into Alf and Alg - Alk pages, and will be assumed for the rest of this numbered list.
- Find the template call, in the double-braced and (usually) bolded markup, that corresponds to the range to be subdivided. In the example,
-
- '''<nowiki>{{subst:lopbn-lrng1|Al|f|k|l}}</nowiki>'''
- produces both the Af-Ak and the Al lks (and, even beyond this particular case of a split, it must be replaced by something that will produce at least one more lk).
-
- Edit Template talk:List of people Al Links, and start by copying the last group delimited by horizontal-rule markup, replacing the date in it, and replacing any reference to "retrofitting" to reflect this being a new version.
- Within that newly duplicated block, start by removing the block of double-braces markup that lacks the <nowiki> tags: this will be eventually replaced by copying the rendered version of the nowikied markup that needs the hand-editing. (If the lines begin with colons, remove the colons.)
- Within the nowikied markup, locate the line generating the lk for the page being subdivided -- which we previously located in the rendered version.
- In our case,
-
- '''<nowiki>{{subst:lopbn-lrng1|Al|f|k|l}}</nowiki>'''
- could be most simply replaced by
- '''<nowiki>{{subst:lopbn-l1|Alf}}</nowiki>'''
- '''<nowiki>{{subst:lopbn-lrng1|Al|g|k|l}}</nowiki>''',
- and replacing it should consist of duplicating the existing line, and editing each copy of it in a different direction.
- (For the benefit of the ambitious student, replacing the preceding line as well, i.e. using
- '''<nowiki>{{subst:lopbn-l2|Al|e|f}}</nowiki>'''
- '''<nowiki>{{subst:lopbn-lrng1|Al|g|k|l}}</nowiki>'''
- would be more compact, and would have been the natural approach if coding from scratch for the hypothetical new situation. If such broader editing were being done, it might help to start editing by duplicating one or both of the lines above and below the line responsible for the page being split. Argueably such a broader edit would be a bad choice as the goal of a modification, since it demands more of anyone trying to follow the development, without much potential reduction of future comprehension or editing effort.)
-
- Preview the result, and copy the rendered (double-braced & probably bolded) version of the markup.
- Paste that markup in, below
- (producing:)
- Preview again, comparing the rendered version below "producing" with the rendered version of Template:List of people Al Links, to be sure the new version does not introduce gaps, overlaps, or sequences out of alphabetical order, or accidentally refer to pages outside the "Al..." scope. If there are errors, the effort of wiping out what follows "producing", further editing the nowikied markup, and repeating steps 8-10 is small, and ensures avoiding inconsistencies within the new block between the horizontal rules that will be unexpected and whose recognition and correction may be psychologically tricky.
- Once the preview looks good, make sure there are no "return" characters (but only blanks) between the double-braced templated calls. (If there are returns, copy (from the edit pane) the freshly edited version of the markup, in place of the copy of the rendered version of the nowikied markup.)
- Save the template talk: page (Template talk:List of people Al Links), paste the (latest) copied markup in as the whole content of the template: page (Template:List of people Al Links) edit pane, and save.