Difference between revisions of "Help talk:Introduction to Templates"

From Computer History Wiki
Jump to: navigation, search
(Info table categories: Automatic addition considered harmful)
 
(More template-added categories!: Done)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Info table categories==
 
==Info table categories==
  
All the templates for the standard info sheets (e.g. [[:Template:Infobox Machine]]) used to automatically stick things in a category. For 'Machine', this was somewhat useless, since it used [[:Category:Computers]], which is totlly generic, and most such pages have a more targeted category, e.g. [[:Category:DEC Systems]], or a sub-category thereof. I have removed that category for now.
+
All the templates for the standard info sheets (e.g. [[:Template:Infobox Machine]]) used to automatically stick things in a category. For 'Machine', this was somewhat useless, since it used [[:Category:Computers]], which is totally generic, and most such pages have a more targeted category, e.g. [[:Category:DEC Systems]], or a sub-category thereof. I have thefore removed that category (for now).
  
The OS template also no longer auto-adds. I think this is better, because e.g. [[:Category:DEC Operating Systems]] is included in [[:Category:Operating Systems]], so every article correctly tagged with the most target Category is still findable from these top-level categories.
+
The OS template also no longer auto-adds. I think this is better, because e.g. [[:Category:DEC Operating Systems]] is included in [[:Category:Operating Systems]], so every article correctly tagged with the most specific category is still findable from these top-level categories.
  
Also, as a matter of style, I don't like automagically adding categories in a way that's not explicit in the article source; I think category inclusion (with some limited exceptions, like [[:Category:Stub Articles]]) should be explicity, and under the full control of the article source.
+
Also, as a matter of style, I don't like automagically adding categories in a way that's not explicit in the article source; I think category inclusion (with some limited exceptions) should be explicit, and under the full control of the article source.
  
 
There may be a good case otherwise, and I'd be happy to listen (and perhaps change my mind). [[User:Jnc|Jnc]] ([[User talk:Jnc|talk]]) 21:06, 18 February 2018 (CET)
 
There may be a good case otherwise, and I'd be happy to listen (and perhaps change my mind). [[User:Jnc|Jnc]] ([[User talk:Jnc|talk]]) 21:06, 18 February 2018 (CET)
 +
 +
== Expandable Nav boxes ==
 +
 +
We have some navigation boxes that are getting large; there is a way to have blocks of things partially 'hidden', so you have to click on something to see the full content. That would reduce the initial size of a navigation box, but leave everything accessible: i.e. there would be a button that one would have to click on to see the complete list.
 +
 +
I do not recall seeing one here on the CHWiki, but I have seen them on Wikipedia, though ([https://en.wikipedia.org/wiki/Battle_of_Ammunition_Hill here] is one), so there is a way to do it with MediaWiki. (If you look in the bottom right corner, you will see a "[show]" button which, when clicked, expands that section of the box.)
 +
 +
I didn't know how to do that, though; I took a look to see how it does that, and there is a complex set of nested templates involved (see [https://en.wikipedia.org/wiki/Template:Navbox here], and then [https://en.wikipedia.org/wiki/Help:Collapsing here]).
 +
 +
With that example, I have worked out how to do collapsible nav boxes on the CHWiki; so if you want to list dozens of things in a nav box, and have them hidden, normally, we can do that. I have investigated further; it is possible to have a nav box where entries 'above the line' are always shown, and entries 'below the line' (for less 'interesting' ones) are initially hidden, and one has to click the '[show]" button to see them.
 +
 +
So we can have a two-part nav box; see sample [[User:Jnc/Test|here]]. I will eventually update this page to explain how it is done, give an example, etc.
 +
 +
Comments? [[User:Jnc|Jnc]] ([[User talk:Jnc|talk]]) 20:50, 29 December 2023 (CET)
 +
 +
== More template-added categories! ==
 +
 +
[[Template:InfoboxALPHA-Data]] and [[Template:InfoboxDECMIPS-Data]] both auto-add categories. Since I'm down on auto-added categories, I propose to ditch these, and do them all manually, when I get a round tuit. [[User:Jnc|Jnc]] ([[User talk:Jnc|talk]]) 21:16, 17 February 2024 (CET)
 +
 +
Done. [[User:Jnc|Jnc]] ([[User talk:Jnc|talk]]) 22:26, 2 November 2024 (CET)

Latest revision as of 22:26, 2 November 2024

Info table categories

All the templates for the standard info sheets (e.g. Template:Infobox Machine) used to automatically stick things in a category. For 'Machine', this was somewhat useless, since it used Category:Computers, which is totally generic, and most such pages have a more targeted category, e.g. Category:DEC Systems, or a sub-category thereof. I have thefore removed that category (for now).

The OS template also no longer auto-adds. I think this is better, because e.g. Category:DEC Operating Systems is included in Category:Operating Systems, so every article correctly tagged with the most specific category is still findable from these top-level categories.

Also, as a matter of style, I don't like automagically adding categories in a way that's not explicit in the article source; I think category inclusion (with some limited exceptions) should be explicit, and under the full control of the article source.

There may be a good case otherwise, and I'd be happy to listen (and perhaps change my mind). Jnc (talk) 21:06, 18 February 2018 (CET)

Expandable Nav boxes

We have some navigation boxes that are getting large; there is a way to have blocks of things partially 'hidden', so you have to click on something to see the full content. That would reduce the initial size of a navigation box, but leave everything accessible: i.e. there would be a button that one would have to click on to see the complete list.

I do not recall seeing one here on the CHWiki, but I have seen them on Wikipedia, though (here is one), so there is a way to do it with MediaWiki. (If you look in the bottom right corner, you will see a "[show]" button which, when clicked, expands that section of the box.)

I didn't know how to do that, though; I took a look to see how it does that, and there is a complex set of nested templates involved (see here, and then here).

With that example, I have worked out how to do collapsible nav boxes on the CHWiki; so if you want to list dozens of things in a nav box, and have them hidden, normally, we can do that. I have investigated further; it is possible to have a nav box where entries 'above the line' are always shown, and entries 'below the line' (for less 'interesting' ones) are initially hidden, and one has to click the '[show]" button to see them.

So we can have a two-part nav box; see sample here. I will eventually update this page to explain how it is done, give an example, etc.

Comments? Jnc (talk) 20:50, 29 December 2023 (CET)

More template-added categories!

Template:InfoboxALPHA-Data and Template:InfoboxDECMIPS-Data both auto-add categories. Since I'm down on auto-added categories, I propose to ditch these, and do them all manually, when I get a round tuit. Jnc (talk) 21:16, 17 February 2024 (CET)

Done. Jnc (talk) 22:26, 2 November 2024 (CET)