<link rel="stylesheet" href="@{'/public/stylesheets/main.css'}">
@{'/public/stylesheets/main.css'}
returns the relative path: /public/stylesheets/main.css
How do I get the full path?
i.e. http://www.something.com/public/stylesheets/main.css
inside the view/template?
You have to use
@@{'/public/stylesheets/mains.CSS}
instead of using single @. See this PlayFramework Template Cheatsheet for example.
From PlayFramework Templates Documentation explains it as:
The @@{…} syntax does the same but generates an absolute URL (notably useful for e-mail).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With