Search

I'm trying to create a simple news system with pagination for a Symphony 2.2 site, and I just can't seem to get it to work. The main news page is a categorized article listing, which is paginated and works great. You can see the page here.

Now, the problem lies in moving to the article view. Each news article [will] link to a page which displays that one article specifically. However, I want a link which will take the user back to the main article view. I can determine the category of the article easily enough, but how do I determine which page the article was on?

Thanks in advance for the help!

To clarify, the issue you are having is that once you are on the article view page, you need to find a way to link back to a paginated article index page that is filtered by page and category. i.e. page 4 under investments.

You first need to know the position of the article in question to be able to calculate which page it belongs to and this isn't very easy to do without having a custom data source to determine the position of said article.

If you don't want to dig into doing a custom data source, your alternative would be to send the page number value alongside the article view link as a get parameter or as part of the URL schema.

http://hilton-unar.org/news/article/chair-application-deadline/2/

or

http://hilton-unar.org/news/article/chair-application-deadline/?pg=2

This way, you could use XSLT to generate the link.

That's perfect, thank you.

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