Codeigniter: gewusst Wie: hinzufügen href-links zu kuratiert Paginierung Ergebnisse

Habe ich getan Paginierung mit CodeIgniter und es ist die Auflistung der Ergebnisse aus meiner Datenbank, wie Titel, Inhalt, Preis, und postid. Ich Frage mich, wie kann ich den Inhalt (Titel, Inhalt, Preis), es zeigt anzeigen als links(

function index() 
    {
            $this->load->library('pagination');
            $this->load->library('table');

            $this->table->set_heading('postid', 'The Title', 'The Content', 'Price');

            $config['base_url'] = 'http://localhost/ganbaru/index.php/site/index';
            $config['total_rows'] = $this->db->get('posts')->num_rows();
            $config['per_page'] = 10;
            $config['num_links'] = 20;
            $config['full_tag_open'] = '<div id="pagination">';
            $config['full_tag_close'] = '</div>';

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

            $posts['records'] = $this->db->get('posts', $config['per_page'], $this->uri->segment(3));

            $this->load->view('site_view', $posts);
    }

Hier ist der code anzeigen

</head>
<body>  


<div id="container">
                    <h1>Super Pagination with CodeIgniter</h1>
                    <?php echo $this->table->generate($records); ?>
                    <?php echo $this->pagination->create_links(); ?>
            </div>
</body>
</html>
  • Wow 100% schön Los 😀
InformationsquelleAutor yoshyosh | 2011-04-03
Schreibe einen Kommentar