Ho to make a whole block clickable? I have made the block and want it to be clickable(entire block) and we can provide the path to it?

Note: There is other question with same heading but it does not provide the answer and it is in context of views.
In the template.php, add an "onclick" attribute with theme_preprocess_block:

function mytheme_preprocess_block(&amp;$variables, $hook) {
  if ($variables['block']-&gt;delta == "my-viewblock-name") {
    $variables['attributes_array']['onclick']='my_click-routine()';
  }
}


Then, in a .js file you add

function my_click-routine(){
  // Do whatever you want here, e.g. show the "page view" when clicking on the block view;
  document.location="page-view-url";
}


This makes the entire block clickable. You can also do more than just navigate to another page.