Still paddling in the shallows of Smyphony. How do I filter content from a data source which has a section link to the target entry. I know I can filter extraneous content in the XSLT, there is a way in the data source?

Sure is. You’ll need to use an Output Parameter from your first data source. Let’s assume you have a two sections Articles and Comments — a comment entry has a Select Box Link back to an Article. On an article display page, you’re going to want to filter the Comments by this one article, yah?

So on your Article data source (the DS that pulls out just a single Article entry), select “System ID” from the Output Parameters list (bottom left of the Data Source editor).

Refresh your page looking at the Params list in the debug (append ?debug to the page and click on Params on the right). You should see a new parameter with the article entry ID as its value. If you have multiple entries from this DS they will be comma-separated.

You can then filter your second DS (Comments) by this parameter. Select the Select Box Link field in comments that points back to your article and enter the parameter created by your first DS:


Not that if there’s no value for the ds-post parameter then the filter will be ignored and all comments returned. This is where the “Required parameter” field comes in.

Thanks Nick. I asked the question before going to work and will have to wait till lunch to see what you are showing me. :-)

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