[-- PrevNext --] Add Next & Prev links

Request and discuss enhancements to ShopSite
Post Reply
bakerman
Posts: 68
Joined: Fri Feb 23, 2007 1:02 pm
Location: Ohio

[-- PrevNext --] Add Next & Prev links

Post by bakerman »

[-- PrevNext --]

^ this code use to automatically add "Prev" and "Next" wrapped around the pages on the old Shopsite versions. Example: Prev 1 2 3 Next

Can this be added back to the most recent Shopsite. I am currently on Version: 12 sp2 r2.1
Jim
Site Admin
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: [-- PrevNext --] Add Next & Prev links

Post by Jim »

The template tag has not been remove so it should still be functioning the same. Depending on the theme you are using there may be CSS that is changing the way it is formatted.
bakerman
Posts: 68
Joined: Fri Feb 23, 2007 1:02 pm
Location: Ohio

Re: [-- PrevNext --] Add Next & Prev links

Post by bakerman »

I contacted Lexiconn support and they couldnt figure it out either.

Use this page as an example: http://www.bakersgas.com/miller-arc-armor-welding-gloves.html

Code:
[-- IF PAGE.NumProducts LE 20 --][-- ELSE --][-- PrevNext NoCenter --][-- END_IF --]
[-- LOOP PRODUCTS NOANAME --][-- PRODUCT --][-- END_LOOP PRODUCTS --]
[-- IF PAGE.NumProducts LE 20 --][-- ELSE --][-- PrevNext NoCenter --][-- END_IF --]

Am I missing any code?
Jim
Site Admin
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: [-- PrevNext --] Add Next & Prev links

Post by Jim »

I did some experimenting with your code and it works fine. The problem is that the Prev and Next will only display after you have a certain number of pages. On your site there are only 2 pages with 20 products on one and fewer than that on the second page. If you make it so there are more pages the Prev Next will display.

To test this I modified the code to have 2 instead of 20. I then assigned 3 products to a page and set the number of products to put on a page to 2. When I published I got two pages and a 1 2 at the top of each page and no Prev Next. If I assigned 5 product to the page so there would be three pagination pages generated I then get 1 2 3 Next on the first page and Prev 1 2 3 Next on the second page and Prev 1 2 3 on the last page.

So it is only in the case where there are just 2 pages generated that the Pref/Next do not display.
bakerman
Posts: 68
Joined: Fri Feb 23, 2007 1:02 pm
Location: Ohio

Re: [-- PrevNext --] Add Next & Prev links

Post by bakerman »

Thank you for looking into this and explaining how it work.
Post Reply