Codeigniter Template library, add_js() method

Posted by Karl on Stack Overflow See other posts from Stack Overflow or by Karl
Published on 2010-06-15T19:58:08Z Indexed on 2010/06/15 20:32 UTC
Read the original article Hit count: 236

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about template