Hello,
Im using CMSMS 1.10.3 and CGBlog 1.9.8
I wonder if anyone can advise, im trying to get the blog setup so when a file has been uploaded (pdf for example) a link to this is shown on the summary template within CGBlog, but I can`t figure out the correct code which needs to be entered within the summary template to allow a direct link to the uploaded file.
At the moment im working around with this code...
{if !empty($entry->fieldsbyname.upload->value)}
<a href="{$entry->file_location}">Click here to view file</a>{/if}
But it only links to the directory and not the file directly
Any help would be greatly appreciated
Thanks very much
Kind Regards
Sam
Linking to a file uploaded from CGBlog summary page [SOLVED]
Linking to a file uploaded from CGBlog summary page [SOLVED]
Last edited by sam_m on Thu Jul 05, 2012 1:00 pm, edited 1 time in total.
Re: Linking to a file uploaded from CGBlog summary page
{$entry->file_location} is only path to loaction of file as you figured out so you need to add value of your extra field as weel.
{$entry->file_location}/{$entry->fieldsbyname.upload->value}
{$entry->file_location}/{$entry->fieldsbyname.upload->value}
Re: Linking to a file uploaded from CGBlog summary page
Amazing!!! such a quick reply, thank you for much for your help, thats spot onuniqu3 wrote:{$entry->file_location} is only path to loaction of file as you figured out so you need to add value of your extra field as weel.
{$entry->file_location}/{$entry->fieldsbyname.upload->value}

Kind Regards
Sam