2
我有以下的分頁樣式如何風格沒有配置分頁鏈接 - 笨
<ul class="pagination">
<li><a href="#"><i class="fa fa-long-arrow-left"></i>Previous Page</a></li>
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">Next Page<i class="fa fa-long-arrow-right"></i></a></li>
</ul><!--/.pagination-->
我想使上面的靜態代碼動態不使用配置
<ul class="pagination">
<?php echo $this->pagination->create_links(); ?>
</ul><!--/.pagination-->
控制器
$config['full_tag_open'] = "<ul class='pagination'>";
$config['full_tag_close'] = "</ul>";
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
$config['next_tag_open'] = "<li>";
$config['next_tagl_close'] = "</li>";
$config['prev_tag_open'] = "<li>";
$config['prev_tagl_close'] = "</li>";
$config['first_tag_open'] = "<li>";
$config['first_tagl_close'] = "</li>";
$config['last_tag_open'] = "<li>";
$config['last_tagl_close'] = "</li>";
$this->pagination->initialize($config);
風格意味着'CSS'或者你想改變UL LI到div等? – Kamran
我只是想讓上面的靜態代碼動態...類必須是相同的 –
你可以分享你的控制器方法,你試過'$ this-> pagination-> initialize($ config);'和在配置數組你可以定義所有的開始和結束標籤。 – Kamran