According to the docs http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html
To create an image link specify the link destination using the url option in $htmlAttributes.:
echo $this->Html->image("recipes/6.jpg", array(
echo $this->Html->image("recipes/6.jpg", array(
"alt" => "Brownies",
'url' => array('controller' => 'recipes', 'action' => 'view', 6)
));On 2 Jun 2014, at 14:37, jagguy <andrew@itfutures.edu.au> wrote:
Hi,
I simply want to display a button instead of a link but the button doesnt appear as I cant override the link display with htmlHelper
In older versions of cake 2.x this does work.
echo "<td>" .$this->Html->link('Edit', array('controller' => 'users',
'action' => 'editteacher/'.$item['User']['id']), array('class' => 'button')) ."<td>";
http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html
No comments:
Post a Comment