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

1.2beta关于模板上重写盒装分页功能的疑问 #1158

Closed
jrotty opened this issue Sep 9, 2021 · 3 comments
Closed

1.2beta关于模板上重写盒装分页功能的疑问 #1158

jrotty opened this issue Sep 9, 2021 · 3 comments
Labels
enhancement Enhancement request
Milestone

Comments

@jrotty
Copy link
Contributor

jrotty commented Sep 9, 2021

在1.1版本下,我站fuctions.php中写入

class Typecho_Widget_Helper_PageNavigator_Box extends Typecho_Widget_Helper_PageNavigator
{
......
}

即可以自定义盒装分页,在1.2beta版中应该怎么写呢

@joyqi joyqi added the enhancement Enhancement request label Sep 9, 2021
@joyqi
Copy link
Member

joyqi commented Sep 9, 2021

我需要对autoload机制做一些加强

@jrotty
Copy link
Contributor Author

jrotty commented Sep 9, 2021

那盒装分类能不能加个给所有页面超链接加class的设置呀。然后在加个支持追加参数,比如https://zezeshe.com/search/1/2/?type=post 这样支持加个参数啥的

@joyqi
Copy link
Member

joyqi commented Sep 9, 2021

直接在functions.php里定义插件接口即可替代

\Widget\Archive::pluginHandle()->pageNav = function ($currentPage, $totalPage, $pageSize, $prev, $next, $splitPage, $splitWord) {
    // do someting ...
};

@joyqi joyqi closed this as completed in b5167db Sep 9, 2021
@joyqi joyqi added this to the v1.2.0-beta.2 milestone Sep 10, 2021
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

2 participants