Alphabetical Paginator
This extension displays only the paginator
Description
This extension will output alphabetical paginator from the data section.
This extension displays only the paginator. To display the filtered data is necessary to use a different data source.
To add a paginator:
- Install the extension.
- Identify the options under "Preferences".
- Add "Alphabetical Pagination" data source in the page (Page resources).
- Add the template to display paginator.
- You specify in the "URL Parameters" for the letter (the parameter should match the setting in "Preferences")
Structure (xml):
<alphabetical-pagination> <entry empty="1">A</entry> <entry empty="1">B</entry> <entry select="1">C</entry> <entry empty="1">D</entry> <entry empty="1">E</entry> <entry empty="1">F</entry> <entry empty="1">G</entry> <entry empty="1">H</entry> <entry>I</entry> <entry empty="1">J</entry> <entry empty="1">K</entry> <entry>L</entry> <entry>M</entry> <entry empty="1">N</entry> ... </alphabetical-pagination>
Attribute of the "select" indicates selected (current) letter. Attribute of the "empty" denotes the letter, which is not found data.
Example structure (xsl):
<xsl:template match="/data/alphabetical-pagination"> <ul style="font-size: 22px;"> <xsl:apply-templates select="entry" /> </ul> </xsl:template> <xsl:template match="alphabetical-pagination/entry"> <li style="float: left; display: block; margin: 2px;"> <xsl:choose> <xsl:when test="@empty"> <span style="color: #888888;"> <xsl:value-of select="." /> </span> </xsl:when> <xsl:when test="@select"> <span style="font-size: 36px; margin: 10px;"> <xsl:value-of select="." /> </span> </xsl:when> <xsl:otherwise> <a href="/test/{.}/" style="color: blue;"> <xsl:value-of select="." /> </a> </xsl:otherwise> </xsl:choose> </li> </xsl:template>
This template will show this paginator (see picture):