Welcome Guest, Not a member yet? Register   Sign In
Assets helper for load css and js file at single view
#2

You've placed your functions inside a conditional which checks for the existence of a function which you do not define (assets). Meanwhile, you have not checked whether the two functions you define already exist.

I would also recommend adding a second, optional parameter to css() to pass the media attribute. Additionally, it would probably be a good idea to use the self-closing form of the link element, in case someone wants to use the function for a page/site with an XHTML doctype.
Reply


Messages In This Thread
RE: Assets helper for load css and js file at single view - by mwhitney - 07-13-2015, 08:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB