Hacker News new | ask | show | jobs
by ruckusing 5147 days ago
I love this method and have almost the exact setup. I do the same for JS too.

In the footer of every page:

    $(document).ready(function() {
      if (V.Views.orders_index) { V.Views.orders_index(); }
    }
Where "V.Views.orders_index" is basically "${controller}_${index}". Thus you just need to actually define that function in an included JS and voila, thats your calling hook and your JS is invoked.