Search

Hi,

I sorted the data by using the code

<xsl:template name="all-videos_sorting">       
    <xsl:for-each select="all-videos/entry">
        <xsl:sort select="@enseignement-video-vues" data-type="number" order="descending" />                         
        <xsl:variable name="cur_lguest" select="name"/>              
    </xsl:for-each>

and i call the template by using

 <xsl:call-template name="all-videos_sorting" /> 

the above code is displaying the result with pagination, but the result is sorted only 12 data, because i gave 12 results per page by using all-videos data source. so it took the first 12 entry sort and display it, when i click pagination it took another 12 accordingly.

but i want to sort the all the datas entered in all-videos section with paging .

Can any one please help to resolve this problem.

Thank you for your solution.

Generally you cannot combine your own XSLT (view) sorting with data source (query) pagination. You should sort your entries in the same data source that does the pagination.

If you must sort in XSLT, then your data source will need to return all entries (no pagination), and you will need to build pagination into your XSLT e.g.

select="all-videos/entry"

might become:

select="all-videos/entry[position() &lt; 12]"

to get the first 12 entries. In reality the logic will be more complex than this.

Create an account or sign in to comment.

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