Search

How is it possible to get access to url params from out dastasource? That is we have a custom datasource and url parameter $kind, we need to add the value of $kind into database query to filter the ouput results of this DS. How can it be achieved?

You need to add a filter on the field which matches the url parameter, this is in the "Filter Results" section of the datasource itself. For example, you might have a field called "Kind" in your section, so you would add a filter to the datasource on that field and type "{$kind}" into the value field.

The data source grab() method accepts an argument $param_pool, try that.

Alternatively in a data source you can access $this->_env to get environment variables, which will contain all params.

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