Welcome Guest, Not a member yet? Register   Sign In
Help with pagination of entries by year
#1

[eluser]jsuissa[/eluser]
I'm encountering issues with {auto_path) and I'm looking for suggestions as to how to override the pagination URL to handle paging for a specific year like 2011.

The {auto_path} tag is used for Next Page links and creates this URL "C5/2011/P10" but what I need to create "C5/P10/2011"

Pagination works well in the code below except when I try to filter it by year. Then only the first page of results works.

Thanks in advance for any ideas.


Code:
{exp:channel:entries channel="communications" limit="10" orderby="entry_date" sort="desc" year="{segment_5}" month="{segment_6}" }

         <div class="news-blk">
          {if count == 1}<h1>{exp:channel:category_heading}{category_name}{/exp:channel:category_heading}</h1>{/if}
          <p><a href="{path=" format="%Y/%m">{entry_date format="%F %Y"}</a></p>
          <p>{communication_content}</p>
          {if communication_document_file != ""}
          <span><a href="{communication_document_file}">[View PDF]</a></span>
          {if:elseif communication_document_link != ""}
          <span><a href="{communication_document_link}">[View PDF]</a></span>
          {/if}
         </div>
         <br />

{paginate}
<div class="paginate">  
{if previous_page}
<a class="prev" href="{auto_path}">Previous Page</a>
{/if}

{if {current_page} != '1'   AND  "{current_page}" != "{total_pages}"  }&nbsp;|&nbsp;{/if}

{if next_page}
<a class="next" href="{auto_path}">Next Page</a>
{/if}
</div>
{/paginate}

{/exp:channel:entries}
#2

[eluser]pickupman[/eluser]
Wrong forum. This should be posted over at the EE forums. Maybe you will get lucky and one of the EE coders will see this.




Theme © iAndrew 2016 - Forum software by © MyBB