Views exposed filter for children terms when on parent term page I have created a views with multiple exposed filters and I need another filter that is based on taxonomy.

My taxonomy structure is:

term 1


child 1.1
child 1.2


term 2


child 2.1
child 2.2


What I want is the following;

path: site.com/taxonomy/term/1

Exposed filter that can filter shows only; 


child 1.1 
child 1.2


How I have a filter that shows all taxonomy structure or when using depth it shows all child terms? Like this;


child 1.1
child 1.2
child 2.1
child 2.2


I'm sure there must be a way to only show the related child terms when on the parent term page.

thanks
You could use a form_alter hook in a custom module (or even your template.php file of your theme) to alter the filter values in the exposed view form. 

as an example:

&lt;?php
    function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id){
        //if it is the exposed filter view
        if (($form_id == 'views_exposed_form') &amp;&amp; 
        //for the view we care about
        ($form_state['view']-&gt;name == 'your_view') &amp;&amp;
        //and the view display we care about
        ($form_state['view']-&gt;current_display == 'your_display') &amp;&amp;
        //and on a taxonomy term page
        (arg(0)=='taxonomy') &amp;&amp; (arg(1)=='term') &amp;&amp; (is_int(arg(2)))){
            //get the childern of the term
            if ($child_terms = taxonomy_get_children(arg(2))){
                //only care about the tids
                $child_terms_tids = array();
                foreach ($child_terms as $child){
                    $child_terms_tids[] = $child-&gt;tid;
                }

                //for the exposed filter, alter the available options
                foreach ($form['exposed_filter_name']['#options'] as $tid =&gt; $term){
                    //is is a child term?
                    if (in_array($tid,$child_terms_tids)){
                        //leave it
                    }else{
                        //remove it
                        unset($form['exposed_filter_name']['#options'][$tid]);
                    }
                }
            }
        }
    }

    ?&gt;