How to make filter criteria fieldset in a view to be collapsible by clicking on a link using tpl file overriding default file?
I got the above working by writing a function in the module as shown in the link

/**
 * Implements hook_preprocess_views_view().
 */
function my_module_preprocess_views_view(&amp;$vars) {
  if ($vars['view']-&gt;name === 'my_view') {
    // Wrap exposed filters in a fieldset.
    if ($vars['exposed']) {
      drupal_add_js('misc/form.js');
      drupal_add_js('misc/collapse.js');
      // Default collapsed
      $collapsed = TRUE;
      $class = array('collapsible', 'collapsed');
      if (count($_GET) &gt; 1){
        // assume other get vars are exposed filters, so expand fieldset
        // to show applied filters
        $collapsed = FALSE;

    $class = array('collapsible');
  }
  $fieldset['element'] = array(
    '#title' =&gt; 'Refine your search',
    '#collapsible' =&gt; TRUE,
    '#collapsed' =&gt; $collapsed,
    '#attributes' =&gt; array('class' =&gt; $class),
    '#children' =&gt; $vars['exposed'],
  );
  $vars['exposed'] = theme('fieldset', $fieldset);
}
  }
}