Monday 10 March 2008 4:22:51 am
Hello everyone, I'm having an issue with creating a link to a pdf file that's uploaded through the editor. I have this code
{if $node.object.data_map.file_version.has_content}
<span class="links"><a href={include uri= 'design:d_templates/file_url.tpl' attribute=$node.object.data_map.file_version}>VIP Access</a></span>
{/if}
File_url.tpl:
{* This template print the url of a file attribute *}
{* Parameters:
$attribute
*}
{concat("content/download/",$attribute.contentobject_id,"/",$attribute.id,"/file/",$attribute.content.original_filename)|ezurl}
This works well, but when there is a file with spaces it doesn't. It shows "http://www.mywebsite.com/content/download/92121/511539/file/file%20name.pdf" It doesn't change the spaces, and because of that I get a 404 module not found page. Is there any way for me to fix this? Thanks.
|