我正在为管理侧边栏创建手风琴布局。现在我需要识别活动链接并向该链接添加一个类active
。这是我的代码:
<div class="accordion-group">
<div class="accordion-heading">
<a href="#collapseSeven" data-parent="#side_accordion" data-toggle="collapse" class="accordion-toggle">
<i class="icon-th"></i> Gallery Manager
</a>
</div>
<div class="accordion-body collapse" id="collapseSeven">
<div class="accordion-inner">
<ul class="nav nav-list">
<li>
<?php echo $this->Html->link('View All',array('controller' => 'gallaries', 'action' => 'index'));?>
</li>
<li>
<?php echo $this->Html->link('Add New',array('controller' => 'gallaries', 'action' => 'add'));?>
</li>
</ul>
</div>
</div>
</div>
做这个的最好方式是什么?提前致谢!