1

When displaying a taxonomy term, how can I also display the teasers of all the child terms of the current term? I still want to display all the content and fields of the current node, but also display the child teasers.

1 Answer 1

1

The taxonomy display won't do this on its own. You could create a view to do this, then display the view below the term page.

If you call the view from a taxonomy term template you could use a "Contextual filter" to pass the term id (tid).

2
  • Thank you for the answer. As far as I understand it now, this is only possible by overriding the taxonomy-term.tpl.php with some custom PHP. If that's the case, why not just do it all withing the custom theme template, and skip the View? Commented May 24, 2013 at 15:48
  • After reading the template module source code, looking for functions that do what I want, I came up with this. $terms = taxonomy_get_children($term->tid, $vid); $a = taxonomy_term_view_multiple($terms, 'teaser'); echo drupal_render($a); Does that seem reasonable? Commented May 24, 2013 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.