2012-06-07 2 views
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}">&nbsp;</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}">&nbsp;</a></li> 
         {/next_page} 

        {/pagination_links} 
       {/paginate} 
      {/exp:channel:entries} 
      </ul> 

      <div class="clear"></div> 

     </div> 
    </section><!--/{embed:chan}--> 

UPDATE

이 당신을 위해 작동합니다

 <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}">&nbsp;</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}">&nbsp;</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}--> 

답변

0

중 하나없는 페이지를 ....있을 때 나는 바보 닫는 UL 태그를 제외한 모든 유무 :

{exp:channel:entries channel="{embed:chan}" category="{embed:cat_id}" status="{embed:stat}" limit="{embed:limt}" paginate="bottom"} 
{if no_results}<p>No Products in this Channel, check channel info?</p>{/if} 
{switch='<ul class="list-column-3">||'} 
    <li> 
     <article> 
      {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> 
{switch="||</ul>"} 
{paginate} 
    <ul class="product-pager"> 
    {pagination_links} 
     {previous_page}<li><a class="prev ir" href="{pagination_url}">&nbsp;</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}">&nbsp;</a></li> {/next_page} 
    {/pagination_links} 
    </ul> 
{/paginate} 
{/exp:channel:entries} 
+0

감사합니다. Derek에게 감사드립니다. – ehime

관련 문제