[Catalyst] javascript in Catalyst using Template Toolkit

Jonathan Rockway jon at jrock.us
Sat Jul 19 02:17:15 BST 2008

* On Fri, Jul 18 2008, kakimoto at tpg.com.au wrote:
>  Did this work?
>    I have actually tried this and yes, like Emily,my JS stuff is store
> in myapp/root/lib/site .
>     <script src="[% Catalyst.uri_for('/multifile.js') %]"></script>
> Does not work.
>  Did I miss anything out?  

Unless you have an action that matches "/multifile.js", nothing is going
to happen when that URL is visited.  If you use Static::Simple, put the
javascript in /static, and link via $c->uri_for('/static/multifile.js'),
then something will happen.

Someone else suggested linking to '/lib/site/multifile.js'.  I don't
think that will work either.

Jonathan Rockway

print just => another => perl => hacker => if $,=$"

More information about the Catalyst mailing list