Search

I'm rigging up a site for an episodic web video show, and I need to integrate "next episode" and "previous episode" functionality.

I've read through this thread on the subject, but the "mysql:" filtering doesn't seem to be working on my 2.2.1 installation. Nor does the custom datasource a member posted help.

Has there been any other attempt at next/previous entry linking?

perhaps have your own id field and not use symphonys id, that way the entry numbers can be sequential and sort your data source on that number.

then your url should have the number in as an url param

then your previous button should be (whatever your URL is)/{urlparam - 1}

then your next button should be (whatever your URL is)/{urlparam + 1}

You will need to also keep a count of all entries a data source that just outputs a count and nothing else can be used. use an if or when statement to disable the next button if your on the current newest entry, and grey out the previous if your on the 1st entry. or u could rig it to loop if you prefer.

hope that helps.

Also you could load a data source with every show ID sorted by date( i assume it wont be a huge number )

Then just use xpath to figure out whats next and previous to whatever shows loaded

Jeff, your first solution is definitely the best.

I have done exactly this using the entry order extension. This will create an order from 1 to n, without any missing numbers, so a simple: current+1 and current-1 will do the trick.

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