I need to generate html tags like the below .. to be precise, i need to add a class to the anchor tag added to the list, but i dnt seem to get it to work ..
<li class="myLIPrevclass"><a href="#" class="myAPREVClass"></a></li>
<li><a href="#" class="active">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li class="myLINextclass"><a href="#" class="myANEXTClass"></a></li>
The challenge is,
- i cant seem to get a class across to the a tag in the next and the previous, i need to solve this
- Even if i leave the a tag blank for the previous and next, CakePHP goes ahead and adds a '>' or '<' which in my case I do not need.
This is what I have tried ..
<?php
echo $this->Paginator->prev(
__(''),
array(
'tag' => 'li',
'class' => 'previous',
),
__(''),
array(
'tag' => 'li',
'class' => ''
)
);
echo $this->Paginator->numbers(
array(
'separator' => '',
'tag' => 'li',
'currentClass' => 'active',
'currentTag' => 'a'
)
);
echo $this->Paginator->next(
__(''),
array(
'tag' => 'li',
'class' => 'next',
),
__(''),
array(
'tag' => 'li',
'class' => ''
)
);
?>
For the disabled titles (for both previous and next) even if i pass in null, Cake add a '>' or '<', and I don't want that
I have checked Creating Pagination With CakePHP For Custom Template Links and Add class to pagination links at CakePHP 2.2
My Cake Version is 2.4.x
I'll appreciate any pointers or help .. Thanks