Welcome Guest, Not a member yet? Register   Sign In
is this a bug of pagination?
#1

[eluser]mariuskmc[/eluser]
I’m a bit stuck now.
see also http://ellislab.com/forums/viewthread/181979/

controller/index/ pagination works perfectly
site: muzica.infosite.ro/evenimente.html

controller/function/variable/ (records are poulated corectly but pagination links remaining at the first link ).
site: muzica.infosite.ro/evenimente/categorie/lansari_de_carte.html

the only compromise solution is to make num_links more big then pages
something like $config [‘num_links’] = ‘100’;

Does anyone know what else I could do?
is this a bug of pagination?
#2

[eluser]seeraw[/eluser]
Hi
No this is not the bug. Instead you have to change your setting for
number of segment parameter of config array to make this work.

Thanks,
Swapnil
#3

[eluser]mariuskmc[/eluser]
Hi,
where and how can I do?
I do not understand too much: D
#4

[eluser]mariuskmc[/eluser]
i make this changes in my controller
Code:
$aData = array('categorie' => $this->uri->segment(3) , 'num' => $config['per_page'] , 'offset' => $this->uri->segment(4));
        print_r($aData) ;
        $data['lista_evenimente']=$this->Evenimente_model->getlistaevenimentecategorie($aData);
        
        $data['paginare']=$this->pagination->create_links();


in model i have
Code:
function getlistaevenimentecategorie($aData =array()) {
    $data = array();
    $categorie = str_replace('_', ' ', $aData['categorie']);
    $this->db->select('evenimentecategorie.idevenimentecategorie,
  evenimentecategorie.numeevenimentecategorienav,
  evenimentecategorie.numeevenimentecategorie,
  evenimente.id,
  evenimente.evenimentecategorie,
  evenimente.titluevenimentenavigare,
  evenimente.titlu,
  evenimente.subtitlu,
  evenimente.descriere,
  evenimente.pozaexterior,
  evenimente.data');
    $this->db->from('evenimente');    
    $this->db->join('evenimentecategorie','evenimentecategorie.idevenimentecategorie = evenimente.evenimentecategorie','inner');
    $this->db->where('evenimentecategorie.numeevenimentecategorienav', $categorie);    
    $this->db->group_by('evenimente.id');
    $this->db->order_by('evenimente.data','DESC');
    //$this->db->order_by('evenimentecategorie.ordonare');
    $this->db->limit($aData['num'], $aData['offset']);
        $q = $this->db->get();
        if ($q->num_rows()>0) {
            foreach ($q->result() as $row){
            $data[]= $row;
            }
            return $data;
        }
    }


you have results online site: muzica.infosite.ro/evenimente/evenimente_categorie/lansari_de_carte.html
but no changes
#5

[eluser]mariuskmc[/eluser]
I also changed

Code:
$config = array
        (
        'total_rows' => count($totalevenimente),
        'base_url' => base_url().'evenimente/evenimente_categorie/'.$categorieselectata.'/',
        
        'first_tag_open' => '<li>',  
        'first_link' => 'pagina',
        'first_tag_close' => '</li>',
                
        'num_tag_open' => '<li>',
        'num_tag_close' => '</li>',
        
        'next_tag_open' => '<li>',  
        'next_link' => 'Pagina urmatoare',
        'next_tag_close' => '</li>',
        
        'prev_tag_open' => '<li>',  
        'prev_link' => 'Pagina anterioara',
        'prev_tag_close' => '</li>',

        
        'last_tag_open' => '<li>',
        'last_link' => 'Ultima pagina',
        'last_tag_close' => '</li>',  
        
        'cur_tag_open' => '<li class="active">',
        'cur_tag_close' => '</li>',
        
        'suffix' => '.html',
        'num_links' => '100',
        
        'per_page' => '5',
        'full_tag_open' => '<ul id="pagination-digg">',
        'full_tag_close' => '</ul>'
        );

$this->pagination->initialize($config);
#6

[eluser]InsiteFX[/eluser]
CodeIgniter User Guide - Pagination Class

InsiteFX
#7

[eluser]mariuskmc[/eluser]
Thanks. no indication for may problem

Quote:controller/function/variable/ (pagination problem)

Quote:controller/function/ (pagination works perfectly)
#8

[eluser]mariuskmc[/eluser]
where and how can I do?
Please give an example
#9

[eluser]InsiteFX[/eluser]
Watch these video's!

Simple Jquery Ajax with Codeigniter

InsiteFX
#10

[eluser]mariuskmc[/eluser]
Thanks. I did not want to do pagination with jquery .... I just tried to see if the problem persists.
Meantime I did the job to run.

Thank you all




Theme © iAndrew 2016 - Forum software by © MyBB