how to add active class in current page in CakePhp

后端 未结 3 1510
醉梦人生
醉梦人生 2020-12-31 23:15

i have a problem similar to this question

How to identify active menu link in CakePHP

i have a page in my default.ctp file in which i want to add \'active\

3条回答
  •  醉酒成梦
    2021-01-01 00:08

    This is a simple logic as follows

  • Html->link('Dashboard', array('controller'=>'users','action' => 'controlpanel'), array('title' => 'Dashboard','class' => 'shortcut-dashboard'));?>
  • Html->link('Contacts', array('controller'=>'contacts','action' => 'index'), array('title' => 'Contacts','class' => 'shortcut-contacts'));?>
提交回复
热议问题