Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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??


in reply to Mojolicious - linking external css/js not working.

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)

  • Comment on Re: Mojolicious - linking external css/js not working. ( taghelpers url_for / link_to / javascript / stylesheet )

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1094851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2024-04-18 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found