Codeigniter Template library, add_js() method
- by Karl
using This Template Library
when i try and use the add_js() function it errors out. I add the regions $_scripts to the template header file but when i load the page it says undefined variable _scripts.
any thoughts?
changed <?= $_scripts ?> to <?= (isset($_scripts)) ? $_scripts : “”; ?>
and obviously i lose the error but the js file still isnt loading.
I did an echo at each step though the add_js() method and the output is correct. I also did an output of $this-js and they both had the corret output. So it gets through the get_js method fine and sets the class variable fine but i dont get anything added to the actual page.