Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to render sortlinks #39

Open
greystate opened this issue May 22, 2015 · 0 comments
Open

Provide option to render sortlinks #39

greystate opened this issue May 22, 2015 · 0 comments

Comments

@greystate
Copy link
Owner

It would be quite cool if the PaginationHelper was able to handle sorting by specific fields and thus be able to output links to change that, e.g. if I specify sorting on Name and Age fields, I would automatically get links with these options baked in (and ability to reverse-sort as well).

E.g. with a standard call like this:

<xsl:call-template name="PaginateSelection">
    <xsl:with-param name="selection" select="$nodeset" />
    <xsl:with-param name="sortBy" select="'Name DESC'" />
    <xsl:with-param name="renderSortLinks" select="true()" />
</xsl:call-template>

I'd get something like this:

<div class="sortlinks">
    <a href="/path/to/page/?sortdir=asc">Name</a>
</div>
<!-- Paginated output -->
<!-- Pager output -->

(Because the default sort was set to DESC)

and obviously on page 3 I'd get this:

<div class="sortlinks">
    <a href="/path/to/page/?p=3&amp;sortdir=asc">Name</a>
</div>
<!-- Paginated output -->
<!-- Pager output -->

Need to check if there are some standard patterns defined for these types of links...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant