I use the Paginator component and helper.
My style code block is as follows.
<div class="pagination">
<ul class="pages">
<li class="prev"><a href="#"><</a></li>
<li><a href="#" class="active">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li class="next"><a href="#">></a></li>
</ul>
</div>
When I try to create pagination using the following
<div class="pagination">
<ul class="pages">
<?php if($this->Paginator->hasPrev()) echo $this->Paginator->prev('<', array('tag' => 'li', 'escape' => false)); ?>
<?php echo $this->Paginator->numbers(array('separator' => false, 'tag' => 'li', 'currentClass' => 'active')); ?>
<?php if($this->Paginator->hasNext()) echo $this->Paginator->next('>', array('tag' => 'li', 'escape' => false)); ?>
</ul>
</div>
The Active class is assigned li tag
, but my template uses the active class toa-href tag
is there any way i can make the cake pass it on a tag
?
source
share