hi, im getting a bit stressed out over this.

I have a view page, what im trying to do is just get a block which displays how many nodes are in the view linked to that page,

So for example, I have a view of all pages created. then I want a block with pages x, pages because the view is displaying pages, then x is how many pages there are in the view, and x would also like to the view.

Is this possible, ive tried different summarizing modules, and views group by module. but still cant do it.

Thanks for any help

Comments

shady_gun’s picture

try this picked it somewhere in the forum can't remember where ...

<?php
global $pager_page_array, $pager_total_items, $pager_total;
$my_view = views_get_current_view();
$items_per_page = $my_view->pager['items_per_page'];
if ($pager_total[0] == 1) {
  echo t('Showing <b>!pager_total_items</b> results',
    array('!pager_total_items' => $pager_total_items[0])
  );
} else {
  $start = 1 + ($pager_page_array[0] * $items_per_page);
  $end = (1 + $pager_page_array[0]) * $items_per_page;
  if ($end > $pager_total_items[0]) $end = $pager_total_items[0];
  echo t('Showing !start-!end of <b>!pager_total_items</b> results',
    array('!start' => $start, '!end' => $end, '!pager_total_items' => $pager_total_items[0])
  );
}
?>