Search

Is it possible to use pagination on a page that already has some url parameters?

Sure, just add more URL parameters to page, or use GET parameters, e.g., "/some/path?page=3".

Sure, you just need to pass these parameters with each link. Can you show an example of what you're trying to do?

You could add the pagination parameter as the first (or last) parameter on the URL. For example:

/home/3/another-param-here/

Alternatively you could use native URL Parameters for everything except the paging parameter, and use a querystring parameter here.

/home/param1/param2/?p=3

You can change the DS to show $url-p number of results.

I have a paging XSLT template that I have which supports my first suggestion. The template builds the previous/next and page number links. It accepts a string value of $url and replaces a particular character with the page number. For example:

<xsl:call-template name="paging"> <xsl:with-param name="url" select="/home/$/param1/param2/" /> // other with-param here </xsl:call-template>

The template does a string-replace on the $ character inserting the page number. This makes it trvial to maintain URL parameters between pages.

I'll post the template up shortly.

The URL parameters are optional on that page, so the GET solution seems to be more useful. But when I append ?page=2, I get a Page Not Found-error.

To be more specific:

On /article, I want a paginated list of all articles. URL parameters are publisher/entry.

On /article/publisher I have a filtered list of articles, displaying only those from the specific publisher. I want this list paginated as well.

And finally, /article/publisher/entry is a single article.

I believe page is reserved for Symphony.

The one caveat is that you can't use the word "page" since this is what Symphony uses to map .htaccess rules onto its index.php, e.g. index.php?page=home ;-)

I'd go with the querystring parameter then. I'll post a good paging template shortly.

Yes, going with ?p=x and adding that as a filter to the DS works fine. Thanks again.

If you don't want to write the paging XSLT logic, I have posted a generic paging template.

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