How to include javascript script links to pyrocms page? How to include javascript script links to pyrocms page? codeigniter codeigniter

How to include javascript script links to pyrocms page?


Alternatively, if this is for a theme and the script is housed within your actual theme/js folder, it becomes:

{{ theme:js file="file.js" }}

Using just the {js} function would send it to the actual system's embedded js files.


If you are creating a template you can do it like this:

{js('file.js', 'modulename')}

See the Pyro documentation.

If this is not the answer you are looking for, please explain more clearly what you want. E.g. in which file exactly do you want to include your javascript?


$this->template->append_metadata(js('foo.js)) will work, or you can dump it into the view as others have suggested.