Thanks, but I managed to do it like this:
<?php
$image = isset($image) ? $image : "";
if ($image != "") {
$output = "<img src=\"".$image."\" alt=\"manager Image\" />";
} else {
$output = "";
}
return $output;
?>
Now I am trying to do the same thing with tabular data. I basically have tabular data, but sometimes the format of the table is different so I want to be able to enter a custom table. I tried this:
<?php
$custom-table = isset($custom-table) ? $custom-table : "";
if ($custom-table != "") {
$output = "";
} else {
$output = "<table id="costs" summary="Monthly Costs">
<thead>
<tr>
<td class="label">Rent</td>
<td>£[*rent*]</td>
</tr>
<tr>
<td class="label">Service Charge</td>
<td>£[*service-charge*]</td>
</tr>
<tr>
<td class="label">Total Monthly Charge</td>
<td>£[*total-monthly-charge*]</td>
</tr>
</table>";
}
return $output;
?>
But it’s just not showing up.
This is how I am calling it:
[!getTable? &custom-table=``!]