User talk:Vapor/sandbox/sandbox3

From The Urban Dead Wiki
Jump to navigationJump to search

You can try something like this:

{{switch|{{{PAGEIN}}}
|case: PM= {{User:MHSstaff/Projects/TestingGrounds1|{{{USERIN}}}}}
|case: RE= {{User:MHSstaff/Projects/TestingGrounds3|{{{USERIN}}}}}
|default= {{User:MHSstaff/Projects/TestingGrounds2|USERIN2={{{USERIN}}}}}
}}


where TestingGrounds1 is a PM template, TestingGrounds3 is a RE template, USERIN is the user you want info for, and TestingGrounds2 uses the pagename to determine the right one to use. In my case, it will checks to see if it is in my Project space or Image space to call one of TestingGrounds1 or 3.

User talk:MHSstaff has examples for the first two cases, where you pick PM or RE.
User:MHSstaff/Images has the pagename one.

-MHSstaff 01:30, 10 January 2011 (UTC)

Yeah, but I think the idea is to have one template that does all the work. I think I've figured it out but I need to get to a computer to do it (I'm on my B&N Nook right now) ~Vsig.png 01:54, 10 January 2011 (UTC)
That's what this does. It is a driver template that depending on if the user puts in a RE,PM,or nothing, well, it calls the right template to use. Splitting it up into separate parts makes it easier to debug. But if you have one that is already working, use that! -MHSstaff 02:00, 10 January 2011 (UTC)