The Skybrary

{{#switch: {{{member|}}}[]

Anyone know if we can "call" {{#switch: {{{member|}}} outside of the context of the table? --Calvin November t/c on 05:18, 20 May 2009 (UTC)

Of course, member is just a normal parameter, and #switch is just a normal parser function. If its set when the template is called, then it can be used anywhere in the template (if not member| will default it to "" an empty string). I'm assuming what you want to do is use the switch to automatically include the member templates. I decided against this because I didn't think it was a good idea to force identification. Similarly, I allowed the user to pick an affiliation/set their own text/bgcolors for the name field, in case they don't really want to identify with a particular faction for RP purposes. It is simple enough to add though, the sample code would be
{{#switch: {{{member|}}}
| SchoolMember = <includeonly>{{{SchoolMember}}}</includeonly>
| ArmadaMember = <includeonly>{{{ArmadaMember}}}</includeonly>
| HandMember   = <includeonly>{{{HandMember}}}</includeonly>
| LeagueMember = <includeonly>{{{LeagueMember}}}</includeonly>
| CourtMember  = <includeonly>{{{CourtMember}}}</includeonly>
| OrderMember  = <includeonly>{{{OrderMember}}}</includeonly>
| Independent  = <includeonly>{{{Independent}}}</includeonly>
| }}
<table goes here>
You might have to fiddle with the placement of the <includeonly> tags, or perhaps we don't need them at all. --(love) 12:49, 20 May 2009 (UTC)