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

From Computer History Wiki
Jump to: navigation, search
(Stub cats are gone now too)
(Expandable Nav boxes: new section)
Line 8: Line 8:
  
 
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)

Revision as of 21:50, 29 December 2023

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)