by ShopSite Lauren » Mon Dec 12, 2011 10:41 am
My guess is that you did a PowerEdit to have all pages display x products per page. That would mean that even pages that don't have any products on a page no longer have 0 in the pagination field but have x products per page. What I would suggest would be to add a check to see if the page has products assigned AND if the pagination field is at 0. That way, even if the pagination field is not 0, if it doesn't have any products, the pagination div won't be displayed.
[-- IF PAGE.NumProducts "0" --]
[-- ELSE_IF PAGE.ProductsPerPage "0" --]
[-- ELSE --]
<div class="pagination">[-- PREVNEXT --]</div>
[-- END_IF --]
in the newest release of ShopSite (which is what you have) there are new tag functions that can check things like greater than, less than, equal to, etc. One way you might want to do the code above is to first check if the number of products per page is less than or equal to the pagination products per page. What this will do is for categories where you do have pagination turned on, but you do not have enough products to take advantage of the pagination, then the DIV for the pagination won't be displayed either, even though the pagination is turned on for that page.
[-- IF PAGE.NumProducts LE PAGE.ProductsPerPage --]
[-- ELSE_IF PAGE.ProductsPerPage "0" --]
[-- ELSE --]
<div class="pagination">[-- PREVNEXT --]</div>
[-- END_IF --]
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.