Don't show the pager if there're no photos on the page.

This commit is contained in:
Bharat Mediratta
2009-03-08 03:57:02 +00:00
parent 2ef8e28198
commit 3c672bd865
+9 -7
View File
@@ -122,13 +122,15 @@ class Theme_View_Core extends View {
}
public function pager() {
$this->pagination = new Pagination();
$this->pagination->initialize(
array('query_string' => 'page',
'total_items' => $this->children_count,
'items_per_page' => $this->page_size,
'style' => 'classic'));
return $this->pagination->render();
if ($this->children_count) {
$this->pagination = new Pagination();
$this->pagination->initialize(
array('query_string' => 'page',
'total_items' => $this->children_count,
'items_per_page' => $this->page_size,
'style' => 'classic'));
return $this->pagination->render();
}
}
/**