Setting the ‘admin’ path using $html->link

Usually CakePHP can work out when link needs to be within the /admin/ section of your site. Sometimes however it needs a little help. When this happens you need to add 'admin' => true to the list of parameters.

1
2
 
echo $html->link($data['SomeModel']['name'], array( 'controller' => 'some_controller', 'action' => 'index', 'admin' => true));