Wikipedia talk:Template namespace/Archive 1

Page contents not supported in other languages.
Source: Wikipedia, the free encyclopedia.
Archive 1 Archive 2 Archive 3

Template and category namespaces

66.167.49.222 18:22, 21 Jun 2004 (UTC): It would be useful to allow a template to include a category and have that category apply to all articles including that template. In the current implementation of category support, including a category into a template does result in an article with the appropriate template and category included, but when you go to the category's article, it simply lists the template as another article in the category and does not descent down the implied level of indirection and list all articles which include the template. For example, check out Columbia River Plateau and Template:Oregon.

I agree putting the template in the category is strange, but what's wrong with the article? Looks like it is OK in the category to me. --ssd 22:52, 21 Jun 2004 (UTC)
66.167.49.222 23:56, 21 Jun 2004 (UTC): I don't if the Template is listed as an article or not; what I would like to see is all of the articles that include the template but not directly including the category still show up in the category. So for example, if Template:Oregon includes Category:Oregon, all articles including Template:Oregon show up in the Oregon category. That's what I meant by descending down a level of indirection...
It does work that way...except that articles that had the template before the category was added will not immediately be put into the category. They will go in after the first edit, even if it is a null edit that does not show in history. --ssd 09:52, 21 June 2004 (UTC)

Not sure if this belongs here..

I made a little template for the occupations of politicians (and other people) you can see at the bottom of many pages. It's at Template:Occubox (didn't came up with a better name), and a little example can be seen at the bottom of my Sandbox. There's also a bug, as the president-link does not work. I don't have a clue why.. I'd like to hear other opinions about this and I'm not sure where to ask, so I'm doing it here. Move my comment if necessary. --Conti| 15:43, 29 Jun 2004 (UTC)

  • I went and had a fiddle with it. From what I can see, templates don't like having | characters as part of the data that is passed to them. See my Sandbox for what happens if I change one of the other entries to have a different visible name than target name. I don't know if there is any way around this, but it is definitely the | that is causing your problems. SkArcher 16:25, 29 Jun 2004 (UTC)
    • Right, it's one missing feature for the templates, the pipe character is always interpreted as the delimiter between two parameters. There should something like masking, e.g. a double pipe (||) being interpreted as a single pipe inside the parameter. This problem is already listed at sourceforge, hopefully a MediaWiki developer will take a look at it because IMHO that one is one of the biggest missing features of template. andy 16:28, 29 Jun 2004 (UTC)
      • Another thing that I discovered was that I can't make a Template which contains just part of a table, for example "{| {{tablestuff}} |}" - where {{tablestuff}} is "|hello world" - does not work. --Conti| 16:39, 29 Jun 2004 (UTC)
      • Is there any other use for a double pipe? I've thought of one ... another kind of pipe trick.;Bear 15:49, 2004 Jul 9 (UTC)

A good place to go for things like this in the future is Wikipedia:Help desk. Wikipedia Help Desk--not just for newcomers. This message brought to you by Wikipedians for helpfulness. [[User:Meelar|Meelar (talk)]] 16:31, 29 Jun 2004 (UTC)

  • Thanks! :-) --Conti| 16:39, 29 Jun 2004 (UTC)

Category

I was excited when I first heard of Wikipedia:Categories because I apparently misunderstood and thought that the list which a category generates would then be useable as a template.

For instance, we have a list of diatonic functions at Category:Diatonic functions, which would fit perfectly at Diatonic function.

Given that this appears to be impossible, it seems like a waste of time for me to create categories since, as the page states, they are much like "What links here" except less useful. In almost all cases they show you a list (in meta-space) which it is then necessary to duplicate elsewhere (in non-meta space).

So, question one is: Am I mistaken and is this already possible? Question two: If it is not now possible, could it be done in the future? Hyacinth 20:30, 29 Jul 2004 (UTC)

I think you are mistaken. I see nothing wrong with the way categories work. You can link from the article to the category just fine, or put the article in the category. Either way, you get a nice automatically maintained alphabetized list of all the articles in the category. I see no advantage (and quite a few disadvantages) to including a category as a template. Categories are not in meta space, they are in category space, with their own mini-article above the list of entries. --ssd 03:21, 30 Jul 2004 (UTC)
Thanks. However, the mini-article adds redundency of the article to the redundancy of the (category) list. Am I mistaken and is this already possible? Question two: If it is not now possible, could it be done in the future? Hyacinth 04:22, 30 Jul 2004 (UTC)

Meta-templates

I have written Wikipedia:Meta-templates considered harmful, with input from User:Jamesday, the main database developer on the project. Meta-templates are basically templates used to commonize the format of yet other templates. One example is Template:Message box. There are a number of problems with using these, which look to outweigh the benefits. -- Netoholic @ 19:31, 2005 Feb 4 (UTC)

Wikipedia:Meta-templates considered harmful has now been proposed to be adopted as a true guideline. Please review and discuss on that pages talk page. -- Netoholic @ 22:49, 2005 Mar 21 (UTC)

As of 20:26, 13 November 2007 (UTC) the document itself says, "This proposal has been rejected by the community." The discussion is here. – Conrad T. Pino 20:32, 13 November 2007 (UTC)

Template table within a table

Same template, different contents

Is there a way to, and if so how does one, create a template into which different information could be added? For example, a template added to a page which automatically takes as its heading the title of that page. Or a template which could be used on many pages with a blank spot for a page specific table, such as the following table within a table:

Perfect fifth
# semitones Interval class # cents in equal temperament Most common diatonic name Comparable just interval # cents in just interval Just interval vs. equal-tempered interval
7 5 700 perfect fifth 3:2 702 2 cents larger
Other diatonic intervals
unison | minor second | major second | minor third | major third | perfect fourth | tritone | perfect fifth | minor sixth | major sixth | minor seventh | major seventh | octave

The bottom half of the table is Template:Diatonic intervals, while the top half is a table from Perfect fifth. The bottom half would be identical on all diatonic interval articles, while the top half would have different info for each. It's much more attractive and helpful as one table.

Is there a way to add {{Diatonic intervals}} and indicate content within (a blank space left for such a purpose in) that template? Thanks. Hyacinth 09:30, 1 Apr 2005 (UTC)

Template in table

Okay, this is a simpler solution:
Perfect fifth
# semitones Interval class # cents in equal temperament Most common diatonic name Comparable just interval # cents in just interval Just interval vs. equal-tempered interval
7 5 700 perfect fifth 3:2 702 2 cents larger