[eluser]Unknown[/eluser]
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
Code:
<?php
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
$this->load->model('post_mod','',TRUE);
$this->load->library('pagination');
$this->load->library('table');
}
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->pagination->initialize($config);
$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';
$this->load->view('home',$this->data);
}
my view in home
Code:
<div class="section">
<div class="section-title">Blog</div
<div class="section-content">
[b]<?$this->load->view($mainpos);?>[/b]<---this include for public_home
<div class="content-separator"></div>
<div class="col3 left">
<div class="column-content">
my view in public_home
Code:
<?
if(count($results)){?>
<?foreach($results as $key => $list){?>
<div class="post">
<div class="post-title"><h2><?php echo $list['post_title'];?></h2></div>
<div class="post-date"><span class="post_date"><?php echo $list['post_date'];?></span></div>
<div class="post-body">
<p><?=auto_typography(word_limiter($list['post_content']),80 );?></p>
<hr>
</div>
</div>
<?}?>
<?}?>
<?php echo $this->pagination->create_links();?>
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
Code:
$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
btw thx before