Author:
tarakanoff
Version:
1.0
Released:
13 November 2011
Category:
Other

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:

  1. Install the extension.
  2. Identify the options under "Preferences".
  3. Add "Alphabetical Pagination" data source in the page (Page resources).
  4. Add the template to display paginator.
  5. 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):

alt text

Discuss this Extension

Compatibility

2.7.10 Unsure
2.7.9 Unsure
2.7.8 Unsure
2.7.7 Unsure
2.7.6 Unsure
2.7.5 Unsure
2.7.4 Unsure
2.7.3 Unsure
2.7.2 Unsure
2.7.1 Unsure
2.7.0 Unsure
2.6.11 Unsure
2.6.10 Unsure
2.6.9 Unsure
2.6.8 Unsure
2.6.7 Unsure
2.6.6 Unsure
2.6.5 Unsure
2.6.4 Unsure
2.5.4 Unsure

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details