Something like this: echo $html->link( $html->image("recipes/6.jpg", array("alt" => "Brownies")), "recipes/view/6", array('escape'=>false) );
or echo $html->image("recipes/6.jpg", array( "alt" => "Brownies", 'url' => array('controller' => 'recipes', 'action' => 'view', 6) )); See: http://book.cakephp.org/view/836/link and http://book.cakephp.org/view/835/image Jeremy Burns jeremybu...@me.com On 11 Feb 2010, at 09:36, sebb86 wrote: > Hello, > > how can i create a button in a view, which links to another view? This > is my code with a simple text link, but how can i this as a button? > > [code] > <!-- add link --> > <?php echo $html->link('add a hardware unit', array('controller' > => 'hardware_units', 'action' => 'add')) ?> > [\code] > > Thanks a lot if someone can help!!! :) > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en