分页助手自定义(样式)
我正在使用 PaginationHelper,在我看来,我需要将当前页面的链接的类设置为“当前号码”,并且我还需要删除 |页前和页后的字符。
我可以使用以下命令设置整体类,但不能设置当前页面类:
numbers(array('before'=>'','after'=>'','类'=>'数字')); ?>
所以 - 我需要生成这个:
但是生成的是这样的:
有没有简单的方法来做到这一点?
理想情况下,我想完全删除跨度,但我在 api 中看不到这样做的方法......
I'm using the PaginationHelper and in my view I need to set the class for the current page's link to "current number" and I also need to get rid of the | characters before and after the pages.
I can set the overall class but not the current page class using:
<?php echo $paginator->numbers(array('before'=>'','after'=>'','class'=>'number')); ?>
So - I need to generate this:
<div class="pagination">
<a href="#" class="number" title="1">1</a>
<a href="#" class="number" title="2">2</a>
<a href="#" class="number current" title="3">3</a>
<a href="#" class="number" title="4">4</a>
</div> <!-- End .pagination -->
But what gets generated is this:
<div class="pagination">
<span class="current">1</span> | <span><a class="number" href="/admin/users/dashboard/page:2">2</a></span> | <span><a class="number" href="/admin/users/dashboard/page:3">3</a></span> | <span><a class="number" href="/admin/users/dashboard/page:4">4</a></span>
</div>
Is there a simple way to do this??
Ideally I'd like to remove the spans completely but I don't see a way to do that in the api...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下内容应该可以
看看源代码,它使您可以更轻松地查看可以设置哪些选项。
The following should work
Take a look at the source code, it makes it easier to see what options you can set.