Template talk:Pirate info

From YPPedia

Template question

I am still a relative greenie to the Wiki scene, and this is my first template, so I have a question on how I could make it better. I'd like to be able to use it by doing either {{Pirate info|ocean=oceanname|pirate=piratename}} or {{Pirate info|oceanname|piratename}}. I have seen similar things done in the pirate infobox template, but that is far too sophisticated for me to be able to delve into and comprehend. Thanks in advance :) --Thefirstdude 06:51, 29 January 2007

As far as I recall that only works when have variables named 1, 2, 3, etc. See Template:Oceans for one example. --Guppymomma 14:17, 29 January 2007 (PST)
Aaaah, the circular reference makes my head hurt. I do see what you mean, though - still not entirely sure how to use this to do what I want to. Oh actually, I have an idea - will try it out now. --Thefirstdude 15:43, 29 January 2007
I suppose I could just answer more directly instead of making you figure it out yourself. Name oceanname 1 and name piratename 2. Then you'll have to always put them in that order in the template, but won't need the = stuff. --Guppymomma 15:44, 29 January 2007 (PST)
Hehe, that's actually what I'm trying to do right now. Kind of failed the first time, though ;) Thanks again. --Thefirstdude 15:49, 29 January 2007
Aaah, actually... I understand how to use the 1 and 2 instead of actual variable names - in fact that works fine here. Maybe it's just not possible to to do what I want. --Thefirstdude 06:57, 29 January 2007
OK, cheap and easy solution Template:Pirate info/no.
And why is it you need the /no? --Guppymomma 15:32, 31 January 2007 (PST)
Hang on a moment. To do what you want, change the template variables to {{{ocean|{{{1}}}}}}}} and {{{pirate|[[[2]]]}}}. This looks for the variable names and, if they aren't defined by the names, uses the position numbers instead. So {{Pirate info|Viridian|Orsino}}, {{Pirate info|ocean=Viridian|pirate=Orsino}}, and {{Pirate info|Viridian|pirate=Orsino}} would all work.--Fiddler 15:41, 31 January 2007 (PST)
Oh, I feel SO stupid now. Thank you so much. I even understand why it works. --Thefirstdude 16:24, 31 January 2007 (PST)