Question
Comment puis-je combiner le lien et l'identité d'image au lithium? Je veux quelque chose comme:
<a href="http://...">
<img src="mypic.png" />
And a title
</a>
J'ai essayé différentes options mais rien ne semble fonctionner, dois-je écrire mon propre aide?
<?php
$image = $this->html->image('mypic.png');
echo $this->html->link('And a title', '', array('html' => $image));
?>
La solution
Vous devez échapper au code html
$image = $this->html->image('mypic.png');
$this->html->link($image, $url, array('escape' => false))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow