Pregunta
¿Cómo puedo combinar el enlace y el ayudante de imagen en el litio? Quiero algo como:
<a href="http://...">
<img src="mypic.png" />
And a title
</a>
Probé diferentes opciones pero nada parece funcionar, ¿tengo que escribir mi propio ayudante?
<?php
$image = $this->html->image('mypic.png');
echo $this->html->link('And a title', '', array('html' => $image));
?>
Solución
Deberías escapar del código HTML
$image = $this->html->image('mypic.png');
$this->html->link($image, $url, array('escape' => false))
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow