link_to("Download File",
sfConfig::get('sf_web_dir')."/".$this->getFileName());On Mon, Oct 19, 2009 at 4:11 AM, Arian Hojat <[email protected]>wrote: > Hey Ant, > > I thought though this may be considered an asset, and therefore this > applies, (but i don't see an asset_include() to look for assets in the web > dir, and form urls to them... although that would be nice): > > "Asset helpers > > Chapter 7 introduced the asset helpers image_tag(), stylesheet_tag(), and > javascript_include_ > tag(), which allow you to include an image, a style sheet, or a JavaScript > file in the response. The paths to such assets are not processed by the > routing system, because they link to resources that are actually located > under the public web directory. > You don't need to mention a file extension for an asset. Symfony > automatically adds .png, .js, or .css to an image, JavaScript, or style > sheet helper call. Also, symfony will automatically look for those assets in > the web/images/, web/js/, and web/css/ directories. > " > Is there anyway I can at least set up a path so it works on both a system > where would work locally on a setup where path to the file is: > http://symfony.localhost/web/files/theFile.doc and then on production path > is: > http://www.example.com/symfony_directory/web/files/theFile.doc > ,Maybe using sfConfig class to form a url based on path to the web > directory (think thats sfConfig::web_dir property or something etc.) > > > > > The purpose of link_to is to generate routed external urls, unless the >> file in question is generated by a module/action you shouldnt use the >> link_to function. >> >> > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
