V
V
Valeriy Donika2014-10-24 21:58:29
CodeIgniter
Valeriy Donika, 2014-10-24 21:58:29

Codeigniter Pagination. How to create such markup?

Имеется вот такая разметка пагинации.
<div class="pagination">
  <a href="#" class="page-prev">previous</a>
  <ul>
    <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>
  </ul>
  <a href="#" class="page-next">next</a>
</div>

I'm trying to do pagination like this. However, I can’t figure out how I can make a link to the previous page outside the ul, and also to the next page, while adding a link class
$config['full_tag_open'] = '<div class="pagination"><ul>';
            $config['full_tag_close'] = '</ul></div>';
            $config['cur_tag_open'] = '<li class="active">';
            $config['cur_tag_close'] = '</li>';
            $config['num_tag_open'] = '<li>';
            $config['num_tag_close'] = '</li>';
            $config['next_link'] = '';
            $config['prev_link'] = '<';
            $config['next_tag_open'] = '';
            $config['next_tag_close'] = '';
            $config['prev_tag_open'] = '';
            $config['prev_tag_close'] = '';

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question