[Solved]Calendar upload file dir

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
cubitus
Forum Members
Forum Members
Posts: 32
Joined: Mon Oct 09, 2006 3:42 pm
Location: Lausanne/CH

[Solved]Calendar upload file dir

Post 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 !
Last edited by cubitus on Sat Sep 01, 2007 6:28 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Calendar upload file dir

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Modules/Add-Ons”