html helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: html helper (/showthread.php?tid=23187) |
html helper - El Forum - 10-03-2009 [eluser]Unknown[/eluser] Hi First CI rock I use html helper and I would like to use img() but I want this img act like a link to point to my controller. it's there a way doing this, I look at the user guide but don't find solution.. I know that I can use property but I don't get it to point to my function in my controller. thanks html helper - El Forum - 10-03-2009 [eluser]bigtony[/eluser] You can embed the img inside an anchor, like this... Code: <?php echo anchor('controller_name/function_name', img(array('src' => 'path/to/image_name.gif', 'alt' => "Calls a controller"))); ?> |