Search

Hi,

I am trying to figure how to combine the filename of an uploaded link with the {$worspace}/files/ directory to get a download link.

What I have working so far is:

<a><xsl:attribute name="href"><xsl:value-of select="document/filename"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="filename"/></xsl:attribute><xsl:text>PDF</xsl:text></a>

But I have no idea how I could add the worspace/files/ directory to the link.

A tip would be nice. Thanks! panic

You can use XPath in attributes using {... }.

<a href="{$workspace}/files/{document/filename}"><xsl:value-of select="document/filenam" /> PDF</a>

Thanks. Great!

Did not know that. Works fine!

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