Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分页插件接口缺少参数问题 #1165

Closed
jrotty opened this issue Sep 10, 2021 · 4 comments
Closed

分页插件接口缺少参数问题 #1165

jrotty opened this issue Sep 10, 2021 · 4 comments
Labels
enhancement Enhancement request
Milestone

Comments

@jrotty
Copy link
Contributor

jrotty commented Sep 10, 2021

$this->pluginHandle()->trigger($hasNav)->pageNav接口缺少 $template参数,加上后才方便相关定制,不知道我想的对不?

$this->pluginHandle()->trigger($hasNav)->pageNav(
                $this->currentPage,
                $total,
                $this->parameter->pageSize,
                $prev,
                $next,
                $splitPage,
                $splitWord,
            );

改成

$this->pluginHandle()->trigger($hasNav)->pageNav(
                $this->currentPage,
                $total,
                $this->parameter->pageSize,
                $prev,
                $next,
                $splitPage,
                $splitWord,
                $template
            );
@noisky
Copy link

noisky commented Sep 10, 2021

其实是支持自定义参数的,只是原来的写法失效了,不知道是不是兼容性问题,
把分页的参数改成字符串格式可以暂时解决这个问题;
修改前

<?php $this->pageNav('&laquo;', '&raquo;', 3, '...', array('wrapTag' => 'ol', 'wrapClass' => 'pagination', 'itemTag' => 'li', 'textTag' => 'span', 'currentClass' => 'active', 'prevClass' => 'prev', 'nextClass' => 'next')); ?>

修改后

<?php $this->pageNav('&laquo;', '&raquo;', 3, '...', 'wrapTag=ol&wrapClass=pagination&itemTag=li&textTag=span&currentClass=active&prevClass=prev&nextClass=next'); ?>

如图
QQ20210910153039

@jrotty
Copy link
Contributor Author

jrotty commented Sep 10, 2021

这个我知道,你没懂我的意思,我是说用接口实现更强的定制,而接口缺少了个必要的参数

@jrotty
Copy link
Contributor Author

jrotty commented Sep 10, 2021

@joyqi 除了上述问题外,Widget\Comments\Archive.php,这个评论列表的翻页按钮也加个插件接口吧

@joyqi joyqi added the enhancement Enhancement request label Sep 10, 2021
@joyqi joyqi added this to the v1.2.0-beta.2 milestone Sep 10, 2021
@joyqi joyqi closed this as completed in 0916631 Sep 10, 2021
@joyqi
Copy link
Member

joyqi commented Sep 10, 2021

@noisky 现在应该可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants