Welcome Guest, Not a member yet? Register   Sign In
pagination problem

(This post was last modified: 04-18-2016, 01:16 AM by insik.)

Why is my ci pagination returns html looked like this when I viewed the source
<ul class="pager_wrap"><li><a href="#" class="pager_style current">1</a></li><li><a href="/user/my_account/2" data-ci-pagination-page="2">2</a></li><li><a href="/user/my_account/3" data-ci-pagination-page="3">3</a></li><li><a href="/user/my_account/2" data-ci-pagination-page="2" rel="next">Next</a></li></ul>

and it prints the html elements on webpage like this 

[font=Helvetica, Arial, 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', メイリオ, Meiryo, 'MS Pゴシック', Verdana, sans-serif]<ul class="pager_wrap"><li><a href="#" class="pager_style current">1</a></li><li><a href="/user/my_account?per_page=2" data-ci-pagination-page="2">2</a></li><li><a href="/user/my_account?per_page=3" data-ci-pagination-page="3">3</a></li><li><a href="/user/my_account?per_page=2" data-ci-pagination-page="2" rel="next">Next</a></li></ul>[/font]

[font=Helvetica, Arial, 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', メイリオ, Meiryo, 'MS Pゴシック', Verdana, sans-serif]this is my configuration for pagination:[/font]

PHP Code:
$config = array(
           'base_url'         => '/user/my_account',
           'total_rows'       => $total_row,
           'per_page'         => 2,
           'use_page_numbers' => TRUE,
           'num_links'        => $total_row,
           'num_tag_open'     => '<li>',
           'num_tag_close'    => '</li>',
           'cur_tag_open'     => '<li><a href="#" class="pager_style current">',
           'cur_tag_close'    => '</a></li>',
           'next_tag_open'    => '<li>',
           'next_tag_close'   => '</li>',
           'full_tag_open'    => '<ul class="pager_wrap">',
           'full_tag_close'   => '</ul>',
           'next_link'        => 'Next',
           'prev_link'        => 'Previous',
           'anchor_class'     => 'class="pager_style"',
           'page_query_string'=> TRUE


I got it now.
I am using twig template engine and it cannot render raw html.

So i just changed
{{ pagination_links }}
{{ pagination_links | raw }}
so twig can render raw html

Theme © iAndrew 2016 - Forum software by © MyBB