Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-03-2008, 08:33 AM
Junior Member
 
Join Date: Oct 2008
Posts: 1
Default Paginator??

Hi Folks,

I've only just started using the Paginator and don't quite seem to be getting it to work.

I have the data in the function, but can't seem to access the Next/Previous properties when I try to produce the Next/Previous 1/2/3 etc links.

My coding is as follows, although I found the documentation quite difficult to follow on the main website.

$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($prods));
Zend_Paginator::setDefaultScrollingStyle('Sliding' );

Zend_Loader::loadClass('Zend_View');
$view = new Zend_View();
$view->setScriptPath(realpath("views/scripts"));
Zend_View_Helper_PaginationControl::setDefaultView Partial('my_page.phtml');

$paginator->setView($view);
$paginator->setCurrentPageNumber($page_num);
$paginator->setItemCountPerPage(4);

$view->paginationControl($paginator, 'Sliding', 'my_page.phtml');
$view->paginator = $paginator;
$view->render('my_page.phtml');

What am I missing / doing wrong? Do I even need a view object, as I'd prefer not to have it and just produce the links/menu myself.

Any help would be great.

Thanks

A
p.s for example - I can't then access $this->pageCount (or even if I go $this->paginator = $paginator or $view->paginator)

Last edited by PHP_coder : 10-03-2008 at 08:34 AM. Reason: Missed something
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:59 AM.