Hi,
I am trying to use the Zend_Paginator for the first time.
i just need to know how to iterate through the pagination object to get the
items from the multidimensional array.
echoing the contents of the paginator:
Zend_Paginator Object ( [_adapter:protected] => Zend_Paginator_Adapter_Array
Object ( [_array:protected] => Array ( [0] => Array ( [VenueName] => CTICC
[VenueID] => 9 [Events] => 2 [CategoryName] => Art Galleries [Area] =>
Greenpoint ) [1] => Array ( [VenueName] => Fiesta Bar and Tapas [VenueID] =>
11 [Events] => 0 [CategoryName] => Internet Cafes [Area] => Greenpoint ) [2]
=> Array ( [VenueName] => Lakers Shark [VenueID] => 10 [Events] => 4
[CategoryName] => Gentlemen's Club [Area] => Kraifontein ) [3] => Array (
[VenueName] => Loft Lounge & Bar [VenueID] => 3 [Events] => 3 [CategoryName]
=> Gentlemen's Club [Area] => Blouberg ) [4] => Array ( [VenueName] => Nose
Restaurant & Bar [VenueID] => 567 [Events] => 3 [CategoryName] => Conference
Centres [Area] => V&A Waterfront ) [5] => Array ( [VenueName] => Pok bar
itan [VenueID] => 4 [Events] => 0 [CategoryName] => Coffee Shops [Area] =>
Gardens ) [6] => Array ( [VenueName] => Rondebosch Gold Club [VenueID] => 8
[Events] => 2 [CategoryName] => Restaurants [Area] => Greenpoint ) [7] =>
Array ( [VenueName] => Stones TygerValley [VenueID] => 12 [Events] => 3
[CategoryName] => Coffee Shops [Area] => Rondebosch ) [8] => Array (
[VenueName] => Unreal stones stone [VenueID] => 566 [Events] => 1
[CategoryName] => Coffee Shops [Area] => Durbanville ) [9] => Array (
[VenueName] => Villa Zest Boutique Hotel [VenueID] => 7 [Events] => 1
[CategoryName] => Hotels [Area] => Greenpoint ) ) [_count:protected] => 10 )
[_currentItemCount:protected] => [_currentItems:protected] =>
[_currentPageNumber:protected] => [_itemCountPerPage:protected] => 10
[_pageCount:protected] => [_pageItems:protected] => Array ( )
[_pageRange:protected] => 10 [_pages:protected] => [_view:protected] => ) 1
but using:
paginator);?>
paginator)){?>
paginator as $items => $item){ ?>
VenueName; ?> // line 319
Events; ?> // line 320
paginationControl($this->paginator, 'Elastic',
'../partials/_pagination_control.phtml'); ?>
I get the the error: Trying to get property of non-object on line 319 & 320.
There is something am not doing right but i cant seem to pin it down.
Thanks
-
dee
--
View this message in context:
http://www.nabble.com/Iterating-through-Zend_Paginator-items-tp23213957p23213957.html
Sent from the Zend Framework mailing list archive at Nabble.com.