How do I limit the number of Views results on specific pages? I have a Views-generated block which lists news. I would like the number of items to depend on the page it is displayed on - for instance: on the front page there's a place for 3, on another one - even 10. Is there a way to do that via a View tpl or template.php code?

I would rather not have an almost-identical copy of the View just for a different purpose.
This works for me:

function MYMODULE_views_pre_build(&amp;$view) {
  if ($view-&gt;name == 'view_name') {
    $view-&gt;items_per_page = 5;
  }
}