简体   繁体   English

自定义视图中的Drupal 7分页

[英]Drupal 7 pagination in custom view

I've created a custom view for a page called views-view--projects-landing-page.tpl.php and I want to include pagination within the page. 我为一个名为views-view - projects-landing-page.tpl.php的页面创建了一个自定义视图,我希望在页面中包含分页。

I'm currently displaying all content within the page but would like to paginate this to 8 items. 我目前正在显示页面中的所有内容,但希望将其分为8个项目。

Please can someone point me in the right direction. 请有人指出我正确的方向。

Thanks 谢谢

On the edit page for the view, make sure you're on the Page display tab. 在视图的编辑页面上,确保您在页面显示选项卡上。 Then look under the Basic settings subsection and look for the Use pager option. 然后查看“ 基本设置”子部分,查找“ 使用寻呼机”选项。

thanks for the help you pointed me in the right direction by chaning the view however due to my custom template I needed to add 感谢您通过查看视图向我指出正确方向的帮助,但由于我需要添加自定义模板

<?php print $pager; ?>

to get it to display in the page. 让它显示在页面中。

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM