Forum:Infobox custom parameter

Hey again everyone, sorry for my constant issues, but I really need help again.

On the highlighted area of this template, is there anyway in the coding that I can change the parameter, so the text can be changed on each page the template is used on? If I used a predefined parameter, I would need to create multiple templates with only one parameter changed for each. I've seen a few wikis that have customizable parameters, and I'm wondering how I can do that.



Thanks! -- Anomalous13 10:55, June 16, 2012 (UTC)


 * You can make it swtich by using magic words. Basically  will give you the current page title. Click the link above to read more.

That's an interesting page, thanks for showing me that! I should've been more specific, but isn't what I need. Is there a "magic word" I can use, so whenever I use the template on a page I can change the text of the highlighted area? -- Anomalous13 11:23, June 16, 2012 (UTC)
 * Then you can just add an another parameter to your infobox.

 ! colspan=2 |
 * (You can change the name Subtitle into whatever you want.) If you want to change the text of that section, just fill the Subtitle parameter:




 * And if it is blank, the page title will be shown instead. I'm a bit afraid that I still didn't understand X)..!

I'm really sorry; this is really hard to explain. I'll do my best lol. I found a perfect example of this on the Call of Duty Wiki. The pictures below are from one page, the M1911 page to be exact.. All the infoboxes on this page are the same template, but yet the highlighted area has different text for each infobox. When editing the infobox on the page, you can type whatever shows up in the highlighted area. In the template's coding, I think I found where the coding for the highlighted area is: ​|- |colspan="2" style="font-size:110%; text-align:center; color:white;" class="infoboxbg2" | |-

The thing is, how can I add something like that to this template? :S -- Anomalous13 12:23, June 16, 2012 (UTC)

...That made no sense didn't it. -- Anomalous13 20:01, June 17, 2012 (UTC)


 * It seems the code to do that is already in place . With that in your infobox, you can simply add the "|name = " parameter to an infobox to change the name. For example,



I finally found the solution to this issue. All I had to do was add a simple  to a certain spot. Thanks for your help guys! --


 * Er, isn't that exactly what everyone above kept saying to do - except as they kept pointing out to you - if you only use , then if Name is left blank, as in:

then your Infobox will have a blank space where the name should go, and since the name you would want to display would usually be the same as the PAGENAME, unless overridden, you should use instead of . Your way, you have to manually type in the Name every time you use the template, instead of letting the template insert the name automatically by default.