In this episode, Bob will blow away your current perspective on Drupal's core taxonomy pages. By default, they're boring lists of content, but with a little magic and a few template overrides, these can be the coolest pages on your site. Please Note: A few follow up comments below point out that what I show here can be done using the taxonomy term description without creating a content type. That's true, but you're missing my point. By using CCK based nodes, you can add MANY other types of information than just a description. Take what I show here as an example for many things you can do, not as the showing of something specific. (see my "sure just an example" comment below)

print views_embed_view('taxonomypages', 'block_1', $tids);see: http://api.lullabot.com/views_embed_view but, because this view embed code does not check the access setting from the view, I created a new functionprint insert_view('taxonomypages', 'block_1', $tids);the function can be found at the bottom of this module code: http://drupal.org/files/issues/insert_view.module.txt and should be part of the next release of the insert_view modulefunction MYTHEME_taxonomy_term_page($tids, $result) { $output = ''; // Only display the description if we have a single term, to avoid clutter and confusion. if (count($tids) == 1) { $term = taxonomy_get_term($tids[0]); $description = $term->description; // Check that a description is set. if (!empty($description)) { $output .= ''; $output .= filter_xss_admin($description); $output .= ''; } } // we use this view to render the content rather than normal taxonmy behaviour $view = views_get_view('MYVIEW'); $output .= $view->execute_display('MYDISPLAY', $tids); return $output; }This way, not only do you gain speed by avoiding tpl file, but also you avoid a call to taxonomy_render_nodes($result); that the module does by default, and that you are not using. See the original theme function to see what I mean. If you dont care for taxonomy term descriptions, you could just remove the first part of the code, and gain a bit more performance that way.- Action to take if no argument: Hide view / Page not found (404)
- Validator: Taxonomy Term, Vocabulary: State
- Argument Type: Term ID
Any ideas/suggestions would be great. Thanks!$view=views_get_view('taxonomypages'); $myargs=array(); $display=$view->execute_display('block_1', $myargs); print $display['content'];and THEN shows you how to change it to this:$view=views_get_view('taxonomypages'); $display=$view->execute_display('block_1', $tids); print $display['content'];That is why I was getting the wrong results. Stupid mistake. Podcast is spot on. Thanks!How It Works So it works like this: /term/television (WORKS: lists all tv's + any products with the grandparent term of television) /term/television/sony (NOT WORK: Does not show anything) /term/television/rerg4wey/sony (WORKS: now this shows only the the sony tvs, which is correct. However, argument 2 can be anything- which i do not want) The problem The problem is that SONY should be in argument 2. I think VIEWS has taken the 'depth' modifier to be argument 2. Is there a possible solution for this?
<?php $view_terms=views_get_view('product_categories'); $display=$view_terms->execute_display('block_1', $tids); print $display['content']; $view_nodes=views_get_view('products'); $display_nodes=$view_nodes->execute_display('block_1', $tids); print $display_nodes['content']; ?>The 'product_categories' is a taxonomy view that displays all child terms based on the parent ID view. The 'products' is a node view that displays any nodes associated with that product category. I thought something like this would be straight forward using taxonomy. I was mistaken. Thanks for the help!