I created a module that looks up some taxonomy terms using taxonomy_get_tree() does some stuff with it and then passes it to a template file. In that template file i want to display them sorted according to some parameters.

The sorting stuff and all works fine but in the end i would just like to display the term using its standard template. But i can't get this to work, i have the entire term object and what i thought i had to do was something like:

theme('node', array('elements' => array('#view_mode' => 'teaser', '#node' => $term)));

but the array needs a lot more items then i can provide, so isn't there an easier way?

1 Answer 1


You are passing 'node' as the $hook value, although your data is for a taxonomy term rather than a node. Trying using the hook 'taxonomy_term' instead of 'node'. I'm not sure what the proper structure for the $variables array is, but if you have the full term object, I would try just passing $term as the second parameter.

documentation for theme()

documentation for theme_taxonomy_term()

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.