简体   繁体   中英

Pager is not rendered on front page in Drupal 7

I see that there is a pager array inside the $page . But it doesn't print a pager.

content (Array, 4 elements)
    system_main (Array, 5 elements)
        nodes (Array, 6 elements)
        pager (Array, 2 elements)
            #theme (String, 5 characters ) pager
            #weight (Integer) 5

I tried to use theme('pager') to print it on the page, but it didn't work.

Any suggestions?

I was having similar problem. Although, I am not able to resolve the problem. But I modified the flow and get similar result by doing following steps.

  • I created one view with full pager in which I configure pager as I required. (Also, Check on front page that paging is working correctly. )
  • Go to Admin >> configration >> site information >> for front give view name. (in place of node name)

You will find that your paging will work correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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