Search

I want to choose what js will be included for every page.

I think i need to put the <script src> values in that variable and call that variable in the master.xsl in the

The following code is not working:

<xsl:variable name="headScripts">
    <xsl:text>
        &lt;script type="text/javascript" src="{$workspace}/inc/jquery-1.3.min.js">&lt;/script>
    </xsl:text>
</xsl:variable>

Thanks a lot vladG!

Didn't think of templates. For me, the best choice now! This is the working code now:

<xsl:template name="head">
    &lt;script type="text/javascript" src="../inc/jquery-1.3.min.js">&lt;/script>
</xsl:template>

Just a curiosity. Are not allowed html elements inside xsl:variable?

Yes they are allowed.

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