Category talk:Infobox templates
From Wikipedia, the free encyclopedia
Contents |
[edit] Deletion
If anyone still feels that this category is unnecessary and should be deleted, please discuss here. Shawnc 18:33, 19 January 2006 (UTC)
- I vote that it should not be deleted, if there is a more suitable name for it that is fine, but the category contents have a lot of utility. Evolauxia 08:30, 26 February 2006 (UTC)
What's the difference between this category and Wikipedia:Infobox_templates? Don't they basically serve the same purpose (and are equally disorganized)? 66.229.182.113 05:21, 15 June 2006 (UTC)
[edit] How to change a template
I want to add another item to Template:Infobox programming language but the page dedicated to that template doesn't tell me how, and neither does this article. -Barry- 03:48, 29 April 2006 (UTC)
- Shown below are three lines from the current Template:Infobox programming language. I'll walk you through what they are doing:
}}{{#if:{{{year|}}}
|<tr><th>Appeared in:</th><td>{{{year}}}</td></tr>
}}{{#if:{{{designer|}}}
- }}{{#if:{{{year|}}}
- The '}}' are actually the closing brackets from a previous function call. Anything enclosed in double brackets is a call to either a template or a 'magic word'. The '{{#if:' is the opening of a new call to a parser function 'magic word'... basically a feature which allows one of two different text strings to be displayed based on a condition. The '{{{year|}}}' is a parameter which serves as the condition for this case. Anything enclosed in three brackets is a parameter. The pipe ('|') character after 'year' indicates that if the parameter is not set then the text between the pipe and the closing brackets (in this case, nothing) should be used. Thus if the call to the template includes a "|year=<whatever>" this parameter will evaluate to "<whatever>" and otherwise it will be blank.
- |<tr><th>Appeared in:</th><td>{{{year}}}</td></tr>
- The pipe at the front indicates that we have reached the end of the condition. Anything between this pipe and the next (if there was another) is treated as the text to display if the condition is not blank. If there were another pipe then anything to the right of that would be the text to display if the condition WERE blank... in this case there is no such 'else' text and nothing will be printed if 'year' is blank. The '<tr><th>' are HTML table codes... 't' stands for table, 'r' for row, and 'h' for header, so 'tr' creates a new row and 'th' indicates that the row is a header... "Appeared in:" is the text to print in the header and '/th' indicates the end of the header. The 'td' indicates a data item, basically a column to the right of the header, which displays the contents of the 'year' parameter. The '/td' and '/tr' then indicate the end of the data item and the row.
- }}{{#if:{{{designer|}}}
- As above the '}}' close our '{{#if:' condition begun on the first line and then we start a new condition. The reason that the '}}' closing is put on a new line is to avoid extra line breaks. If the }} were placed at the end of line 2 then this would evaluate to headerAppeared in: data<whatever> <linebreak> or, if 'year' was blank to <nothing> <linebreak>. Thus five blank rows would evaluate to five linebreaks and there would be a big gap in the middle of the table. Moving the }} down to the next line puts the linebreak inside the #if: condition and thus hides it if the condition fails - preventing the excess linebreaks.
- All a bit convoluted. The short form is to just copy and paste the first two lines where you want the new row to appear and then change 'Appeared in:' and both instances of 'year' to whatever you want to display. Much more detailed explanation of templates, parameters, magic words, and table markup is available at the links interspersed above. --CBDunkerson 10:56, 29 April 2006 (UTC)
[edit] Linking
Is there a way to make all the articles with an infobox ling into a category just by having the infobox??--The Judge 12:04, 6 September 2006 (UTC)
- Yes, by adding the category to the infobox template. There are also ways to have categories in the infobox templates that aren't automatically passed to the including page. This is done via the <includeonly> and <noinclude> tags. For more information, see Help:Template#Noinclude and includeonly. --Elonka 16:44, 28 May 2007 (UTC)
[edit] Infobox naming
I'm noticing a lot of very haphazard names for new infoboxes -- some have the word "infobox", other's don't, and this is starting to mess up things like automated peer review. Does anyone know of a project to try and make the names more consistent? --Elonka 16:46, 28 May 2007 (UTC)
[edit] Can anyone tell me how to make an infobox for my profile?
Because right now, I'm completely pissed.
[edit] Padding
I have suggested adding vertical padding to Template:Infobox Person. Please comment at Template talk:Infobox Person, as this may later be extended to other infoboxes. Superm401 - Talk 05:55, 24 December 2007 (UTC)
[edit] Regarding infoboxes for bowlers in the PBA
I'm assuming this would be the place for me to find out how I could create a template for professional bowlers. Can someone help guide me through the process? Kevindh71 (talk) 19:27, 17 February 2008 (UTC)
[edit] What is the purpose of the {{PAGENAME}} appendix?
What would happen if you omitted it? --Adoniscik(t, c) 17:09, 27 March 2008 (UTC)

