TreeFolx Posted April 23, 2015 Share Posted April 23, 2015 Hello, I have problem with my pagination script, I tried to add tags to it but selecting second page (next page) when tag is working and filter content of the page, gets me back to second page with content without tag.It should look like this:gallery/page/2/?s=&tag=2instead:gallery/page/2I just dont know what to do. Can you help me out?My pagination script:<?php foreach ($this->pagesInRange as $page): ?> <?php if ($page != $this->current): ?> <li><a href="<?php echo $this->url($this->route, array('page' => $page ), true); ?>"><?php echo $page; ?></a></li> <?php else: ?> <li class="active"><a href="#"><?php echo $page; ?></a></li> <?php endif; ?> <?php endforeach; ?> Link to comment https://forums.phpfreaks.com/topic/295794-pagination-with-tags-help/ Share on other sites More sharing options...
blacknight Posted April 23, 2015 Share Posted April 23, 2015 add the 'tag' => $_GET['tag'] in the array with the page number $this->url($this->route, array('page' => $page, 'tag' => $_GET['tag'] ) Link to comment https://forums.phpfreaks.com/topic/295794-pagination-with-tags-help/#findComment-1509769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.