I have deployed pagination to one of templates which should to display only 4 products on a page. Index for that template looks like:
{embed="includes/.header-product" body_color="#FFFFFF"}
{if segment_3}{embed="includes/.nav-main"}{product}{/if}
{if segment_2 && segment_3==""}{embed="includes/.nav-main-subcategory"}{subcategory}{/if}
{if segment_1 && segment_2==""}{embed="includes/.nav-main"}{category}{/if}
{embed="includes/.footer"}
Switchee version of code above:
{embed="includes/.header-product" body_color="#FFFFFF"}
{!-- Category view --}
{if segment_1 && segment_2==""}{embed="includes/.nav-main"}{category}
{!-- /Category view --}
{if:else}
{exp:switchee variable="{segment_3}" parse="inward"}
{case value="#^P(\d+)$#|''"}
{embed="includes/.nav-main-subcategory"}{embed="furniture/.subcategory"}
{/case}
{!-- Subcategory view --}
{case value=""}
{embed="includes/.nav-main-subcategory"}{embed="furniture/.subcategory"}
{/case}
{!-- /Subcategory view --}
{!-- Single product view --}
{case default="Yes"}
{embed="includes/.nav-main"}{product}
{/case}
{!-- /Single product view --}
{/exp:switchee}
{/if}
{embed="includes/.footer"}
and subcategory snippet code looks like:
<div class="container category">
<div class="row row-category">
{exp:channel:entries channel="products" category="{segment_2_category_id}" orderby="title" sort="asc" limit="4" paginate="bottom" dynamic="no"}
{if no_results}
<div class=""><p>No entries yet.</p></div>
{/if}
<div class="col-md-3 col-sm-6 category-item">
<a href="{site_url}{segment_1}/{segment_2}/{url_title}">
{product_image limit="1"}
<img src="{product_image:image}" alt="{product_image:title}" class="img-responsive">
{/product_image}
<h3>{title}</h3>
</a>
</div>
{switch='|||</div><div class="row row-category">'}
{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}
{/exp:channel:entries}
</div><!--/row-->
</div><!--/container-->
First page is OK but other pages comes blank. I think I have done something wrong within index or template structure for furniture group but no clue what can be wrong.
Thanks