Osclass forums
Support forums => Tips, tricks, and tutorials => Topic started by: trains58554 on December 20, 2012, 05:55:26 pm
-
Hi All,
Here is a little tutorial on adding the pagination links to the home page.
First you will want to open the main.php file in your theme folder.
Once the main.php file is open you need to find this line
<p class='pagination'><?php echo osc_search_pagination(); ?></p>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url();?>"><strong><?php _e("See all offers", 'modern'); ?> »</strong></a></p>
Then replace the above code with this code
<div class='paginate'><?php
$params = array('total' => ceil(osc_total_active_items()/osc_default_results_per_page_at_search() ) );
echo osc_pagination($params); ?>
</div>
After you make these changes you will see the pagination links on your home page.
Jay
-
thanks jay
-
hi jay
can i add more page numbers instead of 1,2,3 ?
thanks
-
Thanks for sharing
-
Nice Jay, I'm using auto theme which does not contain the above code. Can i still add it some where in the main.php so it will paginate?
-
@Wayno,
I have not used the auto theme so I am not sure if it will work. You could try adding it and see if it works for you.
Jay
-
Hi Jay,
How can we implement this one using bender themes?
Thanks
-
thanks jay
-
The twitter theme doesn't have those lines. How to do?
-
you will see the pagination links.
-
Hello everyone,
I applied this smartness and it walks for me (bender).
But instead of being aimed to the page2 ' page searches ', I would like to be aimed to page2 ' page home2 '.
Nowadays:
page1 (home) => page 2 (search/iPage,2/)
What I would like:
page1 (home) => page2 (home/iPage, 2/)
Thanks for your answers
Regards,
-
Hi Jay, how to limit the number pagination? Osclass system already have the method for limit? (function in file core, or something already done)
Something pagination like this ( 1 2 3 4 5 ... 999 > ) ?
Thank you very much for this pagination method, works very good :)
Hi All,
Here is a little tutorial on adding the pagination links to the home page.
First you will want to open the main.php file in your theme folder.
Once the main.php file is open you need to find this line
<p class='pagination'><?php echo osc_search_pagination(); ?></p>
<p class="see_more_link"><a href="<?php echo osc_search_show_all_url();?>"><strong><?php _e("See all offers", 'modern'); ?> »</strong></a></p>
Then replace the above code with this code
<div class='paginate'><?php
$params = array('total' => ceil(osc_total_active_items()/osc_default_results_per_page_at_search() ) );
echo osc_pagination($params); ?>
</div>
After you make these changes you will see the pagination links on your home page.
Jay
-
I found a problem, when i click a number of pagination, in page search if i click filter for low price, the results is inverse, ads low price in last of the list (and vice versa).
Regards
-
Thanks for the tip :)
-
Now that was an informative post to read on about how to add pagination links. The links you have shared above was very helpful to know about pagination and how to apply the same. You have explained it in a simple and brief manner.
Thanks
Lourene
microneedle derma roller (http://www.microneedlehelp.com)
-
@train
Good tip,
But if one click on a page number why cant it load the page clicked on mainpage instead of search page?