CodeIgniter Forums

Full Version: [ask]pigination in include page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

dear all i have case with pagination
i cannot browse page if i using pagination in includepage

this my source please healp me
my contoller


class Welcome extends Controller {
    function Welcome()
    function index()
                [b]$config['base_url'] = base_url().'index.php/welcome/';[/b]<---what should i do for this
                $config['total_rows'] = $this->post_mod->count('post');
                $config['per_page'] = 5;
                $this->data['results'] = $this->post_mod->get('post','post_id,cat_id,post_title,post_content,post_date,user_id','',$config['per_page'],$this->uri->segment(4));
                $this->data['mainpos'] = 'public_home';

my view in home
<div class="section">

                <div class="section-title">Blog</div
                                <div class="section-content">

                    [b]&lt;?$this->load->view($mainpos);?&gt;[/b]<---this include for public_home
                    <div class="content-separator"></div>
                    <div class="col3 left">
                        <div class="column-content">

my view in public_home

&lt;?foreach($results as $key => $list){?&gt;
<div class="post">
    <div class="post-title"><h2>&lt;?php echo $list['post_title'];?&gt;</h2></div>
    <div class="post-date"><span class="post_date">&lt;?php echo $list['post_date'];?&gt;</span></div>
    <div class="post-body">
    <p>&lt;?=auto_typography(word_limiter($list['post_content']),80 );?&gt;</p>



&lt;?php echo $this->pagination->create_links();?&gt;

that database can i see but i limit page to 5 page and get page like this 1 2 3 4 > and i want to see page 2 the page is missing i cant declare
$config['base_url'] = base_url().'index.php/welcome/';
in include file please explain to me what should i do for this case
sory my english is poor Big Grin btw thx before

El Forum

It seems your problems is related with removing index.php from your url. Fix that first, then we can deal the rest later.