How to set additional value as parameter in views pager?
By default, the pager links in views looks like 'http://www.sample.com/sample?page=2'.
I want to make url like 'http://www.sample.com/sample?page=2&type=grid'.
I tried to use hook_views_pre_build(). But it didn't made any changes.

function phponwebsites_views_pre_build(&$view){
  if ($view->name == 'review_by_articles') {
     $view->set_items_per_page('10');
     $view->query = array('type' => 'popular');
  }
}

But i can't get correct answer as i expected.

Comments

MustangGB’s picture

Priority: Major » Normal
Issue tags: -views, -views pager, -pager, -drupal 7, -query string
MustangGB’s picture

Status: Active » Closed (outdated)

Closing this as outdated to tidy up a bit around here. If you're still having problems with the latest release please create a new issue.