[eluser]Noobigniter[/eluser]
Hello,
I'm stuck for a while on my pagination ...
In fact, everything seems to work normally but I can not pass data to the links
In my CONTROLLER:
Code:
// initialisation de la pagination
$this->pagination->initialize(
array(
'base_url' => base_url().($this->lang->lang()).'/news/page/',
'total_rows' => $this->News_model->count_news(),
'per_page' => NB_NEWS_PAR_PAGE,
'use_page_numbers' => TRUE,
// previous url
'prev_link' => FALSE,
// current page
'cur_tag_open' => '<li class="active"><a href="[removed]void(0);">',
'cur_tag_close' => '</a></li>',
// next url
'next_link' => FALSE,
// all link
'num_tag_open' => '<li>',
'num_tag_close' => '</li>',
'anchor_class' => 'data-ajax="true" data-href="" ',
)
);
In my VIEW:
Code:
<?php
if(isset($pagination)) :
//superdump($pagination); // super var_dump
?>
<div class="pagination pagination-centered">
<ul>
<?php echo ($pagination);?>
</ul>
</div>
<?php
endif;
OUTPUT :
Code:
<div class="pagination pagination-centered">
<ul>
<li class="active"><!--a href="[removed]void(0);">1</a></li>
<li><!--a data-ajax="true" data-href="" href="/fr/news/page/2">2</a></li>
</ul>
</div>
As you can see, in 'anchor_class' I managed to add the data, but I'd add the same value of links in "data-href", because I use it throughout the site to view pages via Ajax.
PS: I added "!--" in <a> Tag because of the ban to post links from spam.
Thank Google for the translation ... 8-/
In advance, thank you !