We already have a *contextual* filter for "Content: Has taxonomy term ID (with depth)" but the same feature is not available as a filter.

I have a client who would like his exposed filters for taxonomy terms to also take depth into account, just like the taxonomy/term view does.

Would it be hard to duplicate the exact functionality of the contextual filter as a filter? If not maybe I'll give it a shot.

Comments

merlinofchaos’s picture

According to taxonomy.views.inc it should exist as both an argument and a filter:

  $data['node']['term_node_tid_depth'] = array(
    'help' => t('Display content if it has the selected taxonomy terms, or children of the selected terms. Due to additional complexity, this has fewer options than the versions without depth.'),
    'real field' => 'nid',
    'argument' => array(
      'title' => t('Has taxonomy term ID (with depth)'),
      'handler' => 'views_handler_argument_term_node_tid_depth',
      'accept depth modifier' => TRUE,
    ),
    'filter' => array(
      'title' => t('Has taxonomy terms (with depth)'),
      'handler' => 'views_handler_filter_term_node_tid_depth',
    ),
  );
jenlampton’s picture

Maybe I need to add a different relationship to get at it...