0
爲了讓我能夠正確地進行分頁,我必須做出兩個單獨的循環, 不幸的是它顯示了相同的兩個條目反覆,無論頁面。 如何解決這個問題?分頁鏈接返回相同的條目
<section id="{embed:chan}" class="product-content">
<div class="wrap">
<hgroup>
<h1>{embed:title}</h1>
{embed="products/.sub-nav"}
</hgroup>
<ul class='list-column-3'>
{exp:channel:entries channel="{embed:chan}" category="{embed:cat_id}" status="{embed:stat}" limit="{embed:limt}" paginate="bottom"}
<li>
<article>
{if no_results}<p>No Products in this Channel, check channel info?</p>{/if}
{if product_blurb_image}<img src="{product_blurb_image}" alt="{title}" />{/if}
<h1>{title}</h1>
<p>{product_blurb}</p>
</article>
<a class='red-btn' href="{comment_url_title_auto_path}">Learn More</a>
</li>
{!-- The below is needed for a true 3 column layout --}
{switch="||</ul><ul class='list-column-3'>"}
{/exp:channel:entries}
</ul>
<ul class="product-pager">
{exp:channel:entries channel="{embed:chan}" category="{embed:cat_id}" status="{embed:stat}" limit="{embed:limt}" paginate="bottom"}
{paginate}
{pagination_links}
{previous_page}
<li><a class="prev ir" href="{pagination_url}"> </a></li>
{/previous_page}
{page}
<li><a href="{pagination_url}" class="{if current_page}curr{/if}">{pagination_page_number}</a></li>
{/page}
{next_page}
<li><a class="next ir" href="{pagination_url}"> </a></li>
{/next_page}
{/pagination_links}
{/paginate}
{/exp:channel:entries}
</ul>
<div class="clear"></div>
</div>
</section><!--/{embed:chan}-->
UPDATE
我所擁有的一切,但愚蠢的關閉UL標籤時,有一個或沒有頁面....
<section id="{embed:chan}" class="product-content">
<div class="wrap">
<hgroup>
<h1>{embed:title}</h1>
{embed="products/.sub-nav"}
</hgroup>
<ul class='list-column-3'>
{exp:channel:entries channel="{embed:chan}" category="{embed:cat_id}" status="{embed:stat}" limit="{embed:limt}" paginate="bottom"}
<li>
<article>
{!-- I could put the closing </ul> here, but then it'd only show if there was nadda' --}
{if no_results}<p>No Products in this Channel, check channel info?</p>{/if}
{if product_blurb_image}<img src="{product_blurb_image}" alt="{title}" />{/if}
<h1>{title}</h1>
<p>{product_blurb}</p>
</article>
<a class='red-btn' href="{comment_url_title_auto_path}">Learn More</a>
</li>
{!-- The below is needed for a true 3 column layout --}
{switch="||</ul><ul class='list-column-3'>"}
{paginate}
{!-- Close last "list-column-3" open "product-pager" --}
</ul><ul class="product-pager">
{pagination_links}
{previous_page} <li><a class="prev ir" href="{pagination_url}"> </a></li> {/previous_page}
{page} <li><a href="{pagination_url}" class="{if current_page}curr{/if}">{pagination_page_number}</a></li> {/page}
{next_page} <li><a class="next ir" href="{pagination_url}"> </a></li> {/next_page}
{/pagination_links}
</ul>
{!-- This should work, but doesn't --}
{if "{total_pages}" == 1} </ul> {/if}
{/paginate}
{/exp:channel:entries}
<div class="clear"></div>
</div>
</section><!--/{embed:chan}-->
工作很好,謝謝德里克 – ehime