Nodes shown from child term?

Summit - February 4, 2008 - 20:19
Project:Panels Taxonomy
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi,

I have succesfully implemented "panels taxonomy" latest dev version with panels beta2 :) I have succesfully implemented the panels_taxonomy block for a vocabulary. I have implemented the feature of seeing the child terms.
Thank you for this module! It is in my perception the first module, which simple shows the child terms with a taxonomy term out of the box!!

I have a question though, would it please be possible to show the nodes of the child term under the child terms, so the block really becomes a valuable add on?

Thanks a lot for your reply, and thanks again for a great module!

Greetings,
Martijn

Will it please be possible to

#1

Summit - February 6, 2008 - 22:19

Hi,

I think what I am searching for is expanding of the panels_taxonomy_child_terms_list function. To also show the nodes within the child term, something like taxonomy_block. Could somebody please help me to get this done?
EDIT: I have succesfully added this functionality to Panels_taxonomy!

function panels_taxonomy_child_terms_list($tid, $vid, $args, $argidx){
  $count ='';
  foreach (taxonomy_get_children($tid, $vid) as $child_tid => $child_term) {
    $args[$argidx] = $child_tid;
    $items = array();
    $result = taxonomy_select_nodes(array($child_term->tid), 'or', 0, FALSE, 'n.sticky DESC, n.created DESC');
    $children = array();
    $count = taxonomy_term_count_nodes($child_term->tid);     
    while ($node = db_fetch_object($result)) {
      $children[] = node_view(node_load($node->nid), TRUE, FALSE, FALSE);
    }
    $items[] = array(
      'data' => l($child_term->name,'taxonomy/term/'.$child_term->tid)." (".$count.") - ".$child_term->description,
      'children' => $children,
      );
    }
  return theme('item_list', $items);
}

I do not know how to make a patch, and I also not have the time for this. If anybody really likes this add on, please make a patch of it. Then maybe it could be an option to show nodes in the panels_taxonomy module?

Greetings,
Martijn

#2

Summit - February 6, 2008 - 22:49
Category:feature request» task
Status:active» needs review

Set status to code-needs-review. Greetings, Martijn

#3

Summit - February 18, 2008 - 16:06

Hi,
It would be great to have this in panels_taxonomy with may be also choosing from admin what nodetypes should be shown..
greetings,
Martijn

 
 

Drupal is a registered trademark of Dries Buytaert.