I create custom views and print out pager in my views template as below:

if ($pager):
print_r($pager);
endif;

However, the pagination does not work. When I click on next or page number, nothing happened. Then I realize that it is due to url coding generated by Drupal. The link to another page is rendered as: [page-name]&[page-number], but when I replace & with & using firebug, the pagination works. How to tell Drupal to recognize special characters in urls? Or how to replace these special characters with ASCII characters.

Thanks

Comments

tonyvu’s picture

Sorry I mean the link is rendered as [page-name]&amp ;[page-number]

dawehner’s picture

Status: Active » Fixed

Just use print instead of print_r ... In general, please inform you about the difference between print and print_r they are quite fundamental.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.