Search

Hello, I’m a bit new to symphony, and I’m not quite sure if what I want to do is possible the way I want it to.

For ease of explaining let’s say I have a list of articles across 5 pages. Each page is accessed by {$root}/articles/1, where 1 - page number.

What I need is two types of “views”:

  • {$root}/articles/my-cool-article <- for a unique article entry and
  • {$root}/articles/1 <- for pagination.

Is that possible to do within one DS? I’m not quite sure how to form URL parameters for this case either.

Any suggestions? :)

Hi nexjsa.

As far as I can tell, to achieve this you have to write a bit of code.

First, I’d create two datasources, one for single articles and the other for pagination. Then I’d use a slightly modified version of Nils’ great tip to prevent one of the datasource to execute.

You can, for example, use is_numeric to determine wether your url param is a page or an article title.

Thanks, that really helped. :)

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