Welcome Guest, Not a member yet? Register   Sign In
show only next and previous link in condeigniter pagination
#1

[eluser]Unknown[/eluser]
hi , I'm currently working on art web site i want to show last submitted paints on index and many different places so I'd like to show last paints like amazon and just show the next and back button and off course I'll use Ajax to take out the result just like amazon , my code is :
Code:
public function index($offset="")
        {
            $data['content'] ='main_v' ;
            $data['title'] = 'WelCome To Avishe Web Site ';
            $data['last_artist'] = $this->artist_model->getLastArtist();
            $config['base_url'] = base_url().'index.php/main/index' ;
            $config['num_links'] = 1 ;
            $config['total_rows'] = $this->db->count_all('profile');
            $config['per_page'] = '4';
            $this->pagination->initialize($config);
            $data['links'] = $this->pagination->create_links();
            $data['last_profile'] = $this->system_model->getLastProfile($config['per_page'] , $offset);
            $this->load->view('index_v' , $data) ;
            
        }
i have no idea how to do that . because generated links is numeric and put together and i can't take next and previous .




Theme © iAndrew 2016 - Forum software by © MyBB