RE: Pagination outside of channel entries tag?
Is this really the best way to place the pagination links outside the Channel entries tag? It seems ugly.
(And out of curiosity: is there a benefit to putting paginate inside the Channel entries tag? I'm wondering why EE was designed this way.)
Also, is there a way to control what is added to the URL segment? Say I wanted to change "P1", "P2", etc. to something else? What if I wanted it to be query string? I will paginating through search results and would like the GET param values in the URL.
UPDATE 1:
Trying the Stash solution, I did this:
// Inside the tag pair
{exp:stash:set name="pagination"}
{paginate}
<p>Page {current_page} of {total_pages} pages {pagination_links}</p>
{/paginate}
{/exp:stash:set}
And the later on in the same Stash template file:
{exp:stash:get name="pagination"}
This approach results in two things that I do not want:
- The pagination still shows inside the tag pair
- The pagination does not show outside the tag pair
EDIT 2:
This solved my Stash problem: https://gist.github.com/1206694