Template:Wpd-catlist-up
From Wikipedia, the free encyclopedia
- Note page has hidden operative code when viewed directly.
|
|||
---|---|---|---|
datestamp and programmer | Version | Origin | Change Description |
FrankB 03:42, 22 May 2007 (UTC) | Ver: A3 | Wikipedia | +new param CALLEDBY=Wpd-catlist-up (missed update on wp ver) + initialized and updated WPTSP version table with both Wikipedia and Commons changes |
18:25, 21 May 2007 FrankB | Ver: A2 | Wikipedia | (Iterim - Belated Install of expanded capacity (from 40 to 110 links!) and subst:WPTSP version) |
16:45, 16 May 2007 FrankB | Ver: A1 | Commons | m (Add parameter "CALLEDBY=Wpd-catlist-up" (used in {{catlist}}) and changed "SISTER=W:" to "{WPD}" so see local redlinks -- not sure what happened to expansion to 110 from 40 (Back edit buffer I hope!)) |
|
|||
20:46, 14 May 2007 Polarlys | Ver: A | Commons | Restored to Ver: A (Reverted edits by PolarBot (talk) to last version by FrankB) |
18:17, 14 May 2007 PolarBot | Ver: A! | Commons | (Commons:Deletion_requests/2007/01#Template:Wikipedia) |
01:03, 9 March 2007 FrankB | Ver: A | Commons | (Iterim update from en.wp 22:51, 7 March 2007 (UTC), with some new options--this will allow passing of overrides of the boilerplate at need) |
22:51, 7 March 2007 FrankB | Ver: A | Wikipedia | (Iterative and Iterim -- This version will wrap back after the title, then begin the list. PARAM==> NW will not wrap. parms pre, end, post) |
|
|||
06:18, 6 March 2007 FrankB | Ver: 0e | Wikipedia | m (Adj formatting) |
19:17, 5 March 2007 FrankB | Ver: 0d | Wikipedia | m (Formatting -- Add column break using END= param) |
06:14, 4 March 2007 FrankB | Ver: 0c | Wikipedia | m (typo) |
07:36, 4 March 2007 FrankB | Ver: 0b | Commons | m (Template:Wpd-catlist moved to Template:Wpd-catlist-up: Move to better name descriptive of use) |
05:36, 4 March 2007 FrankB | Ver: 0a | Wikipedia | m (moved Template:Wpd-catlist to Template:Wpd-catlist-up: better discription of purpose... uplinks) |
01:41, 4 March 2007 FrankB | Ver: 0 | Commons | Imp to Commons (←New page: {{catlst|SISTER=w:|LABEL=''<b>en.Wikipedia parent and upper level categories:<b>'' : |{{{ 1|}}}|{{{ 2|}}}|{{{ 3|}}}|{{{ 4|}}}|{{{ 5|}}}|{{{ 6|}}}|{{{ 7|}}}|{...) |
23:41, 2 March 2007 FrankB | Ver: 0 | Wikipedia | (Generate catlist-up template (needs renamed)) |
19:16, 1 March 2007 FrankB | Ver: _a | Wikipedia | m (fix link (namespace)) |
19:07, 1 March 2007 FrankB | Ver: _0 | Wikipedia | (Genesis as a redirect (temporary) -- stub in-- destination name for local -- filter template -- iterim - This needs params lists etc. see also: Template: Cms-catlist [since, MOVED TO Cms-catlist-up]) |
As of May 2007, now also a Cms-catlist, and Wpd-catlist for same level cross-category links, which like the original version of this, is comma delimited instead of bullets, and like this, has custom boiler plate text and defaulted arguments. Those call 'Catlist', which is the backend template presenting comma delimited lists. |
Option parameters for [[template:Wpd-catlist-up]]: {{catlst}} is the working template which builds the links and output string. This template {{wpd-catlist-up}} is a front end, or [[W:Filter program|filter module]] which does most of the typing for you for the working (and very generalized template). This filter refines and eases your effort to simple cut and paste, and keeping category relationships straight. These defaults are sent to {{catlist}}, which are defined in terms of parameters you can override: |PRE={{{pre|'''}}} |POST={{{post|{{#if:{{{nowrap|{{{NW|}}}}}}|'' |<br />''}}}}} |END={{{end|</b>''<br /><br />}}} |SISTER=w: |LABEL={{{label|<b>en.Wikipedia parent and upper level categories:'' }}} |
So you can define at need:
|pre=formating command, acts before all other output, including the title Label |post=formating commnad, acts after the title, and before any list element |end= formting (termination) command, acts at the exit of the string. |label=to override the default message. Note the one given means the parents, and grandparents and possibly, the great grand-parent levels.
Convention: paste in parent categories from page bottom (assuming default skin). To the right of that, paste in the parents of the leftmost parent category, then the second from left's parents, then the third, until the rightmost parent and it's parents have joined the list. If properly named, most grandparents will be identifiable as to which parent category they belong to, and vice versa.
This '{{Wpd-catlist-up}}' template documentation is transcluded for all or based templates and those sharing the common usage page {{Catlst/doc}} (including) templates [edit].
- This template 'Wpd-catlist-up' is a front end template for either {{catlst}} or {{catlist}}
- which generate bullet delimited and comma delimited category lists respectively. Which front end template that calls these two defines where the links are made to, such as for the de.category pages (German) or fr.category pages (French), or across English sister projects.
These defaults below are defined within each front end template, and then passed to {catlst} or {catlist}. After they are defined in 'fixed' terms (default format and message) they still possess parameters (those shown in lower case) you can override.
These values are hypotheticals; each front end can define these differently dependent upon the needs of the purpose and preferences of the editors. |PRE={{{pre|'''}}} |POST={{{post|{{#if:{{{nowrap|}}}{{{NW|}}}|'' |<br />''}}}}} |END={{{end|</b>''<br /><br />}}} |SISTER={{{sister|A default wikilink abbreviation}}} examples of defaults -- 'commons:', 'w:', 'de', 'ja:', etc. |CALLEDBY=XXX (varies with name of front end filter program. Currently: Cms-catlist, Wpd-catlist, Cms-catlist-up, and Wpd-catlist-up... The above paramter is an error message pass through to the catlst/catlist templates. |LABEL={{{label|<b>en.Wikipedia parent and upper level categories:'' }}} | As defined, the 'NW' or 'nowrap' parameter must be set true, or the example front end shown above would begin a new line after displaying the LABEL parameter and thus before listing the first category on a newline entirely. As written, the label would be in bold text, and the list shown in bold italic text.
So you can define at need:
- PRE|pre = before the LABEL formating command, acts before all other output, especially the title 'LABEL|label'.
- POST|post = formating command, acts after the title, and before any list element.
- END|end = After everything formating (termination) command, acts at the exit of the string built. Use to turn off italics, bold, etc.
- LABEL = Generates a default message refined for the designed template use (as far as possible).
- label = Use to override the default message.
- To suppress any labels, say to used the templates in a talk page inline as part of a sentence, enter an .
- Note the one given by the '-up' suffixed template series means the parents, and grandparents and possibly, the great grand-parent levels.
- The default message for 'In site links' 'Cms-catlist'/'Wpd-catlist' and so forth is devised for cross-linking siblings of the same parent-tree in the scheme, or cross-links to other useful information in a different scheme.
Convention: paste in parent categories from page bottom (assuming default skin). To the right of that, paste in the parents of the leftmost parent category, then the second from left's parents, then the third, until the rightmost parent and its parents have joined the list. If properly named, most grandparents will be identifiable as to which parent category they belong to, and vice versa, and the farther out the list, the higher one is on the category scheme with respect to the current page.
Similar templates at English sister projects [edit] | |||
---|---|---|---|
mta | Meta-wiki | Wpd-catlist-up | |
wpd | Wikipedia | Wpd-catlist-up | |
cms | Commons | Wpd-catlist-up | |
wbk | Wikibooks | Wpd-catlist-up | |
wsp | Wikispecies | Wpd-catlist-up | |
wvy | Wikiversity | Wpd-catlist-up |
[edit] Usage
- displays a list of category links as a 'Bullet separated list'
- with a editor selectable label. If no label is given, defaults to 'Categories:' 'list of links...'
- Up to 110 parameters are permitted: only the first is mandatory.
-
- The list is dynamically generated so that a "
, and
" is always placed between the final two entries.
- The list is dynamically generated so that a "
-
- If more than 110 entries are supplied, a message will be displayed pointing out the run-over problem with the occurence of the 111st.
-
- The template is interwiki capable: Defining the perameter
|SISTER=Commons:| or |SISTER=Wikiquote:|
will generate a cross-wiki list of categories on SISTER. In either local mode or cross-wiki, this allows the heads of categories to display parents and grandparents for navigation, within and without, with a custom message.
- The template is interwiki capable: Defining the perameter
Example use:
{{Catlst|LABEL=something sensible| Category Name_1 | optionalCategory Name_2 | optionalCategory Name_nn | ... | optionalCategory Name_40}}
- Caution
- Bad formatting: no newlines are permitted else the article links will be broken.
[edit] Filter utilities
The several filter utilities call catlst to do the work:
- They provide a proper link prefix which enables the utility to output the same result on any sister site and server. This is adaptable to interlingual link formation as well.
- The filter templates also provide standard boilerplate text.
- 1) '{{Cms-catlist-up}}/{{Wpd-catlist-up}}' are designed to tag the tops of categories with upper level links to parent and grandparent categories located on the Commons/Wikipedia sister projects, respectively.
Its message is: The Commons parent and upper level categories:
-
- A) {{Cms-catlist-up}} is constructed from catlst by calls of the form:
{{catlst|SISTER={{CMS}}|LABEL=<br>''<b>The Commons parent and upper level categories:</b>'' :|Nature| Geomorphology| Landmarks| Landscapes}} - B) Example use is:
The Commons parent and upper level categories:
Nature · Geomorphology · Landmarks · Landscapes · Places · Geography · Landforms · Geography · Topics · Earth sciences and Social sciences
- A) {{Cms-catlist-up}} is constructed from catlst by calls of the form:
-
- C) The equivilent catlst call would be:
{{catlst|SISTER=w:|LABEL=<br>''<b>The Commons parent and upper level categories:</b>'' : |Nature | Geomorphology | Landmarks | Landscapes | Places | Geography | Landforms | Geography | Topics | Earth sciences | Social sciences }}
- C) The equivilent catlst call would be:
- 2) {{Wpd-catlist-up}} is designed to tag the tops of categories with upper level links to parent and grandparent categories located on Wikipedia.
Its message is: en.Wikipedia parent and upper level categories:
- A) '{{Wpd-catlist-up}}' is constructed from catlst by calls of the form:
{{catlst|LABEL=''<b>en.Wikipedia parent and upper level categories:</b>'' : |Nature| Geomorphology| Landmarks| Landscapes}} - B) Example use is:
- A) '{{Wpd-catlist-up}}' is constructed from catlst by calls of the form:
Nature · Geomorphology · Landmarks · Landscapes · Places · Geography · Landforms · Geography · Topics · Earth sciences and Social sciences
-
- C) The equivilent catlst call would be:
<nowiki>{{catlst |SISTER=w: |LABEL=''<b>en.Wikipedia parent and upper level categories:</b>'' : | Physical geography | Geomorphology | Nature | Topography |{{{5|}}}|{{{6|}}}|{{{7|}}}| ... |{{{40|}}}|{{{41|}}}}} and etc.
- C) The equivilent catlst call would be:
[edit] Key Innards
- take note in particular the position of the parameters
- PRE, LABEL POST and END... The whole is an series of If-Then-Else conditionals, one following on the heels of, or (most all) within, the Else body of the one preceding. Once the logic finds a FALSE condition, it executes the last Else and Exits.
- The 'LABEL=' is a title, such as for example: Parent Categories, Key Grand-daughter categories, and the like.
- The 'PRE=' is for a print effect command such as coloration, {{indent}}ation, Bolding, or such like <div style="border:#bfb1a3 solid 1px; Margin=0.5em; Padding=1.5em; background:#f2e0ce; ">
- The 'POST=' can be used to force a newline and begin an indentation, add or cancel bold or italics, and such.
- The 'END=' is to undo whatever either the PRE or POST or both put into effect.
Since passing a whole template into another template containing meta-characters is problematic, this breakage into three sections allows a lot of flexibility.
[edit] Purpose
{{Catlst}} is used for small to large sets of see also information at the end of text headers on category pages to give cross-links to category names locally.
Unlike {{cat see also}}, this list utility takes a Programmable argument, the parameter LABEL which over rides the generic list message, for example: 'LABEL=These are some map categories (two category layers down), might be given to better show a categorization scheme, highlighting the actual categories it it desired to list pages within, rather than the current skeleton category that should only contatain other categories in the categorization scheme.
This format allows the maximum flexibility in crafting messages and providing links on a theme which is satisfied by the list.
This is particularly valuable at major nexus points, where several categorization schemes intersect such as a major nation-state, or city.
A couple of see also lists can display category names by the scheme's respective theme, down several levels if necessary, giving the browsing reader a much broader and deeper look at the options and paths available, or the overall structure and direction the information they seek may lay.
This also aids in editor work adding or adjusting categories, as one may not know a scheme exists grouping vertical or cross links of related names looking at one little slice on that nexus. For the working editor, or the browsing reader having a peek into sub-categories, and seeing a group of organized lists can aid greatly in deciding where the appropriate direction to hunt, or level of categorisation may be.
Placing such groupings where category schemes fork with respect to en.wikipedia vs. the Commons, or to galleries, or to higher level categories might be excellent alternatives that should be considered in many circumstances. Such should be devised with the student in mind as aids to understanding the direction the normal category tree may take the user.
- Program and format by perameter, {{Catlst|...}}
- 'Clean' Links are presented an auto-pipetricked (nice) form of [[:Category:Category Name|Category Name]].
- If non-English wikipedians create a hard redirect in 'Category:Name In English' to the equivalent in their language, the links should also work interwiki across languages.
[edit] Other list templates
See also:
- Front end templates
- -- Use for 'same level' cross connections in category schemes
- {{Cms-catlist}}
- {{Wpd-catlist}}
- -- Use to display parent and grandparents cross wiki's, and esp. on own pages to make up deficiencies in default skins for navigation.
- {{Cms-catlist-up}}
- {{Wpd-catlist-up}}
- Rear end templates:
- {{See also}} — Note: The commons template {{see also}} is interlingual and has nothing to do with lists of pages in namespaces per se.
{{See also}} primarily used to forms links to main (article/gallery/book) namespace in Comma separated list format. It has some capability of displaying categories, but needs both the colon as a prefix and namespace to form the string ':Category:', and requires painstakingly careful input devoid of extra spaces. Such uses cause an occasional technical problem with parsing within the template due to the colon prefix needed, so cat see also below was developed to eliminate those problems and save typing as well.
- {{see Also}} -- [Commons version] Same template, interwiki Name case alternative when prior use / naming collisions have occured on some sister projects. Other sister projects should implement as a redirect.
- {{see also commons}} — interwiki version of the see also template to category namespace in en.wikipedia giving links of the form: [[commons:category:Name|Name]].
- {{see also Wikipedia}} — interwiki version of the see also template to Wikipedia article space.
- {{Cat see also}} — Smaller grand-parent to 'catlst'. Similar to the 'see also' templates to main space but with the prefix meaning see also these Categories. Like 'catlst', it has been updated to allow links internally, or across SISTER projects. Builds a shorter comma delimited list of categories of up to fifteen names cross-linking to categories, up, down, or across as needed. Unlike 'catlst' it always wraps to a newline, indents, and does not allow the flexible formating parameters PRE, POST, LABEL, or END. It has the standard header message "See also categories:" (or category).
- The two complimentary filter templates using {{cat see also}} as an output stage are:
-
- {{Catlst Wikipedia}} meaning See also on en.Wikipedia the Categories: ...
-
- {{Catlst commons}} meaning See also on Mediawiki Commons the Categories: ...
- Each are a 'front end' filter template (or typing-aid) using the {{Catlst}} template as an output stage. Each uses a fixed 'SISTER=' parameter.
- {{Template list}} — essentially the above template with the namespace category replaced by the namespace template.en:Template:Wpd-catlist-up
See also: