Harro Verton wrote on Thursday 12th of May 2011:Are your routes setup to accept the additional URI segments?
'admin/media/:pagenumber' => 'admin/media/$1'; 'admin/media/:any' => 'admin/media/$1'However, this does not work. It does take me back to my media page, however the first page's images are still shown. EDIT:
'admin/media/:pagenumber' => 'admin/media/$1';My Media controller:
$paginationConfig = array( 'pagination_url' => 'http://localhost:8888/asl1105/jbuff/cms/admin/media/', 'total_items' => count($articleImages), 'per_page' => 2, 'uri_segment' => 3, ); Pagination::set_config($paginationConfig); $data['example_data'] = DB::select('*')->from('images')->where('imageType', '=', 2)->and_where('authorID', '=', $authorID) ->limit(Pagination::$per_page) ->offset(Pagination::$offset) ->execute() ->as_array();
<ul id="imggallery"> <?php if(count($example_data) > 0) { foreach($example_data as $image){ echo '<li>'; echo Asset::img($image['imagePath'], array('alt' => $image['alt'])); echo '<div class="imgtitle">'. $image['title'] .'</div>'; echo '</li>'; } } ?> </ul> <?php echo Pagination::create_links(); ?>
// Config::set('pagination', $config); // you can use this too! Pagination::set_config($config);
It looks like you're new here. If you want to get involved, click one of these buttons!