Tengo este codigo
Código PHP:
foreach ($this->items as $row) :
$imagefile = $row->icono;
echo "<td valign='top' align='center'>";
if (JFile::exists(JPATH_COMPONENT.DS.'assets'.DS.'images'.DS.$imagefile)) {
echo "<img src='".JURI::root(). 'components'.DS.'com_documentos'.DS.'assets'.DS."images/pdf.png'>";
}
echo "</td>\n";
echo "<td width='100%' valign='top'>\n";
echo $this->escape($row->title);
echo "</td></tr>";
endforeach;
Entonces cual es la sintaxis para sustituir el pdf.png por nombre del icono, en este caso $imagefile.
Un saludo.