Smarty Static Path?

Go To


How to specify the static content in Smarty? I have many zip attachement for users to download. How do I specify the filepath in Smarty?

DOMAIN_NAME/static/ or ?

2012-04-04 07:30
by jebberwocky


If your webapp is available at and your zip files are stored in the static folder, at the same level of your webapp root then just:

{foreach $zips as $zip}
    <a href="/static/{$zip}">{$zip}</a>

If the zip files are outside the web root then you either move them there or make a symlink.

2012-04-04 09:08
by noisebleed
thanks! a quick question: will smarty use the module "static" if I access the path - jebberwocky 2012-04-05 02:46
If you want a url instead of a absolute or relative path use href="". Not sure what you mean by "module" - noisebleed 2012-04-05 08:53