Created
August 22, 2011 11:28
-
-
Save curtisblackwell/1162180 to your computer and use it in GitHub Desktop.
Pagination snippet using [Bjørn Børresen's AB Pagination](http://www.addonbakery.com/) and [Mark Croxton's Switchee](http://devot-ee.com/add-ons/switchee)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!-- | |
This will only work if embedded in another switchee tag pair. | |
If it's not embedded, change the {switchee} tags to {exp:switchee}. | |
--} | |
{paginate} | |
{switchee variable="{abp_has_previous}"} | |
{case value="1"} | |
<a class="paginate_more" href="{abp_previous_link}">←</a> | |
{/case} | |
{case value=""} | |
<span class="paginate_end">←</span> | |
{/case} | |
{/switchee} | |
{abp_pages padding="5"} | |
{switchee variable="{abp_is_current}"} | |
{case value="1"} | |
<span class="paginate_current">{abp_num}</span> | |
{/case} | |
{case value=""} | |
<a href="{abp_link}">{abp_num}</a> | |
{/case} | |
{/switchee} | |
{/abp_pages} | |
{switchee variable="{abp_has_next}"} | |
{case value="1"} | |
<a class="paginate_more" href="{abp_next_link}">→</a> | |
{/case} | |
{case value=""} | |
<span class="paginate_end">→</span> | |
{/case} | |
{/switchee} | |
{/paginate} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment