I am doing some processing in hook_boot
since I need that code to run on every page, irrespective of whether or not they are cached.
As a result, jQuery is undefined when I add inline JavaScript to the page.
function hook_boot() {
drupal_add_js("jQuery('document').ready(function() { //do });");
}
The idea is that we will potentially load a lightbox on every page after processing in hook_boot
.
The only way I can see round this is using variable_set
and then retrieving that in another hook (e.g hook_node_*
). However, that might not be sufficient since we need it to run on every page.
How would you get round this?