I feel really dumb asking this question but is it possible to put the pagination code inside an embed? I have a site that has pagination on several templates and I don’t want to have to replicate that code in all those templates. Here is an example of what I am trying to do.
{exp:weblog:entries weblog="articles" limit="5" orderby="date" sort="desc" paginate="both" disable="categories|category_fields|member_data|trackbacks"}
--- the html for the page ---
{embed="site_includes/_pagination"}
{/exp:weblog:entries}Then in the embed I have this code:
<div id="pagination">
<span>Go To Page</span>
<select id="pagination_pages">
{exp:loop_plus start="1" end="{total_pages}" increment="1"}
<option value="{index}">{index}</option>
{/exp:loop_plus}
</select>
<span>of {total_pages}</span>
<div class="pagination_links">
{pagination_links}
</div>
</div>I am getting {paginate}{/paginate}{paginate}{/paginate}{paginate}{/paginate} returned on the page.
Any Ideas?
Thanks