Pass no. of pages arguement to Drupal views pager I have created views with display as page. In pager there is option to set no. of page to show. How can I set this dynamically by passing it through url? I can pass the page using 
?page=2 and offset using ?offset=2 but I cant find a way to pass the no. of pages to show.
I still don't quite get what you are asking about, but you should be able to examine $view-&gt;pager in a hook_views_pre_build and do what you want.  For example, this is a snippet of code I have used in Drupal 6 and Views 2 to set the number of items per page:

function mymodule_views_pre_build (&amp;$view)
{
    if ($_GET["perpage"]) {
        $perpage = check_plain($_GET["perpage"]);

        if (is_numeric($perpage) &amp;&amp; (int) $perpage &gt; 1) {
            $view-&gt;pager["items_per_page"] = (int) $perpage;
        } else if ($perpage == "all") {
            $view-&gt;pager["use_pager"] = false;
            $view-&gt;pager["items_per_page"] = 0;
        }
    }
}