There's more than one way to do things | |
PerlMonks |
Re: Mojolicious - linking external css/js not working. ( taghelpers url_for / link_to / javascript / stylesheet )by Anonymous Monk |
on Jul 23, 2014 at 21:24 UTC ( [id://1094851]=note: print w/replies, xml ) | Need Help?? |
If the files you're trying to link come with your application, and you're using .ep, use the taghelpers
https://metacpan.org/pod/Mojolicious::Plugin::TagHelpers#stylesheet https://metacpan.org/pod/Mojolicious::Plugin::TagHelpers#javascript They all make use of https://metacpan.org/pod/Mojolicious::Controller#url_for to resolve your paths, to always make correct urls even if your apps path changes I make use of javascript and url_for in Mojolicious::Lite +and jQuery +AJAX + Mojo::Template and *cough* Re: calling menu bar creating code from another cgi/pl code (mojo)
In Section
Seekers of Perl Wisdom
|
|