CodeIgniter Forums
global configs for pagination? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: global configs for pagination? (/thread-47634.html)



global configs for pagination? - El Forum - 12-15-2011

[eluser]w1n78[/eluser]
i'm trying to set $config values for the pagination class so that it can be used throughout the application without having to set it in every controller class. i created a My_pagination class that extends CI_Pagination and i get an error...

Code:
/* Location: APPLICATION_PATH/libraries/My_pagination.php
*
*/
class My_pagination extends CI_Pagination
{
public function __construct()
{
  parent::__construct();
  
  $this->full_tag_open('<p class="pagination">');
  $this->full_tag_close('</p>');
}
}

Quote:Fatal error: Call to undefined method My_pagination::full_tag_open() in... line 9

what am i doing wrong? is this the right approach? i just want to set the open and close tags for the page links and set the per_page. this was the same approach i used for extending the CI_Form_validation class and it worked, why doesn't this one work?