[[File:UnknownCombo.png|200px|center]]to show (the actual image I mean). Thanks in advance. Any changes to the template, feel free to make them.
[[File:UnknownCombo.png|200px|center]]to show (the actual image I mean). Thanks in advance. Any changes to the template, feel free to make them.
I've looked at the template and at the page where you have called the template (Bubbly ). Judging from the template history, I'm guessing you want the 'top secret' image to cover the entire area of where three images sit now? If so, then an 'If' tag could probably do that. If not, then please explain a bit better what it is you are trying to accomplish.
In the meantime, I'll see if I can work up the code for what I have guessed at (assuming a senior member doesn't beat me to it ;p)
Hi.
The general thing I want is that if all the parameters are blank it shows said image instead of existing code.
Okay, have you considered a #switch as an option? It would require less code I think, as you would need nested #If tags to reproduce one condition based on 3 parameters.
Check out the template I got help with a couple weeks ago here . It uses a #switch to display either: one additional parameter, or 3 different additional parameters, depending on the input for 'Type'. (there's a lc extension to accommodate various input types, just omit it)
If you are not familiar with coding it, I'll work on it.
Edit: I tried a test with nested #if tags. Something wasn't right, so I undid the edit. I'm refreshing my memory at http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions to get the syntax right. If anyone else can assist more quickly, please do.
You actually got the general idea right, but wrote it like {{#if{{{1}}}|...
instead of {{#if:{{{1|}}}|...
.
Just one thing, though: the way it's currently written, parameter 2 will only display if 1 doesn't exist, and 3 if there's no 1 or 2. Is this what you want, Luke? Otherwise, I know how to fix it.
On second thought, unless you define it like {{combination|2=whatever}}
, it's just about impossible to define {{{2}}} and not one. Am I wrong in thinking this is the case here? Again, I know how it would work otherwise.
Never mind, I checked out that "Bubbly" page listed above and in the WLH page, and you clearly defined all three. I therefore rewrote the template again to reflect that. As it stands now the logic goes:
You can now see on w:c:moshimonsters:Bubbly that all three defined pics are shown. If you play around with that and preview it, you should see the desired effect take place.
Thanks for the assist, Smaller. I definitely omitted the colons; silly mistake. For reference, where you added pipes in the 1, 2, 3 parameters, does that just define the defaults as empty?
Pretty much. If you write it as
{{#if:{{{param}}}|Whatever|Something else}}
then if it's written out like
{{template|param=}}
it will still act as though that param exists, and display "Whatever". With , it takes empty parameters the same as parameters not defined at all.