This is what I am trying to do:
<div style="margin:.2em 0.4em 1.4em 0.4em;">
{| style="width:220px; background:#faf5ff; margin-top:.2em; border:1px solid
#ccc; float:right;"
|color:#000"|
<table bgcolor="#faf5ff" width="100%" border="0">
<tr><td width="150px"> </td><td
width="150px"> </td></tr>
<tr><td colspan="2" align="center"
bgcolor=lavender><strong>'''{{{name}}}'''</strong></td></tr>
{{#ifeq:{{{image|}}}||<tr><td valign="top" colspan="2"
align="center">[[Image:{{{image}}}|center|150px]]</td></tr>|nothing}}
{{#ifeq:{{{organization|}}}||<tr><td
valign="top">'''Organization:'''</td><td
valign="top">{{{organization}}}</td></tr>|nothing}}
{{#ifeq:{{{politics|}}}||<tr><td
valign="top">'''Political
ideology:'''</td><td
valign="top">{{{politics}}}</td></tr>|nothing}}
{{#ifeq:{{{issues|}}}||<tr><td valign="top">'''Key
issues:'''</td><td
valign="top">{{{issues}}}</td></tr>|nothing}}
{{#ifeq:{{{website|}}}||<tr><td
valign="top">'''Website:'''</td><td
valign="top">{{{website}}}</td></tr>|nothing}}
</td></tr>|nothing}}
</table>
|}
</div>
I tried using normal table syntax first and then switched to this. I put
nothing in there as a placeholder so I could see when the #if was false.
How should I escape the syntax to make this work or to be able to use normal
wiki table syntax.
Lennie
On Feb 20, 2008 3:31 PM, Platonides <Platonides(a)gmail.com> wrote:
Lennie Jarratt wrote:
I want to use the #if statement in a template to
display or not display
a
row if no data is being sent into the template.
Are there some easy
examples out there showing how to do this?
Thanks.
Lennie
Lots of examples on wikipedia templates. It will look like this:
{{#if: {{{1|}}} | <row code escaped with {{!}} > |}}
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l