Search

I have been trying to juggle input and output parameters to pull in information from my data sections and failing. It occurred to me last night,that I might be able to create a page parameter using xsl:param or xsl:variable in the page stylesheet which I can point to filter the data sources?

Should I rush home at lunch time and try this?

Unfortunately not — parameters created by a DS can be passed to another DS, but you can not pass an xsl:param back into a DS. The ‘parameter pool’ visible when you append ?debug and click “Params” will show this — only Data Sources can add items to the param pool. Page-level xsl:params are scoped to the page only.

Which is a shame.

If you need additional param-pool parameters, you could try the Global Parameter Loader extension.

Nick,

My scanned the info regarding the Global Parameter Loader extension and my eyes glazed over. Maybe once I have got over the first hurdles of Symphonism.

I may be able to solve this with a url parameter page, but I was hoping to be able to have a more elegant solution.

Thanks

You can create URL parameters in two ways:

  • adding a “URL Parameter” to a page, so that they appear in the form `/page/param-1/param-2/
  • use querystring parameters: if you append ?param-1=test to a page it will create a parameter named url-param-1 which will be available to your Data Sources (you’ll see it in the param pool)

If you use the latter, be sure to define this parameter name in your XSL, else the stylesheet will throw an error when the querystring parameter is not present. At the top of your stylesheet (outside of any templates).

<xsl:param name="url-param-1"/>

Hopefully that gives you the flexibility you need.

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