Search

How can i test if a param passed by url exist or not ?

I assume that you expect a GET parameter like in http://example.com/?hello=true.

Test if it exists:

<xsl:if test="/data/params/url-hello">
    …
</xsl:if>

Test if it has a non-empty value:

<xsl:if test="normalize-space(/data/params/url-hello)">
    …
</xsl:if>

The same works for Symphony's URL params (but they won't be prefixed with url- like the GET parameters).

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