前端模块Joomla中的分页 [英] Pagination in front end Module Joomla

查看:102
本文介绍了前端模块Joomla中的分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在谷歌搜索槽中找到了将分页添加到模块中的方法,但是我只能找到有关将分页添加到组件中的信息,例如:

I've searching trough google for a way of adding pagination into a module, but i could only find information about adding it into components like here:

如何为组件前端添加分页结束(Joomla 2.5)

是否可以实施相同的原理对模块进行分页?还是需要其他方法?

Is it posible to implement this same principles to make a pagination for a module?, or a different approach is needed?

推荐答案

我认为这不是尝试在joomla模块中实现分页的正确方法.通常,仅使组件能够使用标准的Joomla分页,因为它使用自身的模型和视图控制器...

I think this is not the correct way of doing to try to implement pagination in a joomla module. Normally, only component are made to be able to use standard Joomla pagination, because it uses itself models and view controller...

我们在您建议的链接上看到的示例是使用视图控制器(view.html.php)中的分页,扩展JViewLegacy(witch是JView的别名).分页本身受其支持.

The example we see on the link you propose is using pagination from the view controller (view.html.php), witch extend JViewLegacy (witch is an alias for JView). Pagination is natively supported by it.

我想您需要在一个模块上显示许多项目页面,但是也许重新加载页面不是最佳选择.您也许可以尝试加载更多项目,并使用JS脚本进行分页(即使使用滑块也可以很好地做到这一点),或者只是向相关组件的整个部分添加链接.

I imagine you need to show many items pages on a module, but maybe reload the page for it is not the best option. You can perhaps try to load more items, and to use a JS script to do pagination (even a slider can do it nicely), or simply to add a link to the whole section of the associated component.

这篇关于前端模块Joomla中的分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆