in cake we use
$this->html->script(‘jsfilenamewithdotjs’);
to add an external js file to a view
How’d we do that with lithium
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
echo $this->html->script('jquery.js');returns a<script />tag. If the filename is prefixed with"/", the path will be relative to the base path of your application. Otherwise, the path will be relative to your JavaScript path, usuallywebroot/js.For an external script
$this->html->script('http://foo.com/bar.js');Docs: http://li3.me/docs/lithium/template/helper/Html::script()