[Catalyst] file paths when using catalyst controllers.

Tomas Doran bobtfish at bobtfish.net
Tue Nov 11 00:46:26 GMT 2008

On 9 Nov 2008, at 05:08, kakimoto at tpg.com.au wrote:
>   4) the static file accesses files in the following manner :
> "images/default/logo.gif" hence the request above would result in the
> request being
> "subscription/images/default/logo.gif"

Don't do that. Use $c->uri_for.

That means, in your template HTML, you write:

<img src="[% c.uri_for('/images/default/logo.gif') %]">

This should solve your problem, and will also mean that your  
application will work correctly when if base it at /myapp/ on your  
web server.


More information about the Catalyst mailing list