By: RobN
Date: 2010-10-28
Time: 01:32
|
Hiding empty fields in Joomla
Hi,
{tbs}mergeblock=m;sql=SELECT a, b, c, d, e FROM table WHERE id = 2 {/tbs}
<table border="0">
<tbody>
<tr>
<td>Heading</td>
<td>Entry</td>
</tr>
<tr>
<td colspan="2">
<p><span class="subhead">Name: </span>[m.a]</p>
<p><span class="subhead">Address 1: </span>[m.b]</p>
<p><span class="subhead">Address 2: </span>[m.c]</p>
<p><span class="subhead">Address 3: </span>[m.d]</p>
<p><span class="subhead">Country: </span>[m.e]</p>
</td>
</tr>
</tbody>
</table>
|
I'd like to be able to hide the whole of a line so <p>to</p> inclusive when for example c is empty, can I use [when] as it is or do I need to make each entry a row in the table?
|
By: Skrol29
Date: 2010-10-28
Time: 11:06
|
Re: Hiding empty fields in Joomla
Hi,
Parameter "when" is for blocks. parameter "if" is for fields.
In your case the simplest way is to use :
<p><span class="subhead">Address 2: </span>[m.c;magnet=p]</p>
|
|
By: RobN
Date: 2010-10-28
Time: 18:42
|
Re: Hiding empty fields in Joomla
Yeah, that fixed it, thanks for that.
|
|
Posting in progress.
Please wait...
|