链接不适用于仪表板,但另一个链接正在工作

in layout/default.ctp i done code like this but working fine page but in Dashboard link was not working but shows on move over i found the url

 <?php if ($this->Session->read('Auth.User')): ?>  
    <?php echo $this->Html->link('Dashboard','/Dashboard/index', array('controller' => 'Dashboard', 'action' => 'index','class'=>'classname')); ?> &nbsp;     
    <?php echo $this->Html->link('logout','/users/logout', array('controller' => 'users', 'action' => 'logout','class'=>'classname')); ?>
<?php else: ?>
    <?php echo $this->Html->link('Register', '/users/add',array('controller' => 'users', 'action' => 'add','class'=>'classname')); ?>&nbsp;
    <?php echo $this->Html->link('login', '/users/login',array('controller' => 'users', 'action' => 'login','class'=>'classname')); ?>
<?php endif; ?>

If the Dashboard is one of your controller you have, you have to use dashboards if it is DashboardsController.php, if it is DashboardController, use dashboard in the controller variable in the below code, I think you need to fix some other issues too please see the code difference between the below code and yours.

 <?php 
             if ($this->Session->read('Auth.User')): ?>

       <?php echo $this->Html->link('Dashboard', array('controller' => 'dashboards', 'action' => 'index'), array('class'=>'classname')); ?> &nbsp;     
       <?php echo $this->Html->link('logout', array('controller' => 'users', 'action' => 'logout'), array('class'=>'classname')); ?>
    <?php else: ?>
     <?php echo $this->Html->link('Register', array('controller' => 'users', 'action' => 'add'), array('class'=>'classname')); ?>&nbsp;
        <?php echo $this->Html->link('login', array('controller' => 'users', 'action' => 'login'), array('class'=>'classname')); ?>
    <?php endif; ?>

Try this and tell me if there is anything

Hope it helps.