Page 1 of 1

[Solved]Calendar upload file dir

Posted: Fri Aug 31, 2007 9:45 pm
by cubitus
Hello,

Is there any possibility to have a smarty template have the information concerning the directory (url) where the file are uploaded.

I mean I've created a "upload file" custom field. Now from the smarty template I would like to create an html link that point to the uploaded document. The custom field contains only the name of the file I've uploaded but not its path (url).

How can I create this link.

By the way, is it possible to access the information contained in the php $config from smarty ?

Thanks !

Re: Calendar upload file dir

Posted: Fri Aug 31, 2007 11:45 pm
by calguy1000
if gCms isn't a smarty object already...
you could create a UDT that did this:

Code: Select all

global $gCms;
$config =& $gCms->GetConfig();
$smarty =& $gCms->GetSmarty();
$smarty->assign('config',$config);
then you can use the config array inside your templates.