Do you know how to make a little changes in the code, that would make taxonomy in a teaser print as the list,and in a node as the custom coma separate, need this very match

Comments

rstamm’s picture

Currently it is not possible to set different styles for teaser and full node.

You have to customize the function term_display_nodeapi in file term_display.module

Find:

if ($term_display_data['style'] != TERM_DISPLAY_LOAD) {
  $node->content['term_display_'. $vocabulary->vid] = array(
    '#weight' => $term_display_data['weight'],
    '#value' => theme('term_display_'. $term_display_data['style'], $vocabulary, $terms),
  );
}

replace with:

if ($term_display_data['style'] != TERM_DISPLAY_LOAD) {
  if ($a3) {
    // Teaser
    $teaser_style = TERM_DISPLAY_LIST;
    $node->content['term_display_'. $vocabulary->vid] = array(
      '#weight' => $term_display_data['weight'],
      '#value' => theme('term_display_'. $teaser_style, $vocabulary, $terms),
    );
  }
  elseif ($a4) {
    // Full node
    $node->content['term_display_'. $vocabulary->vid] = array(
      '#weight' => $term_display_data['weight'],
      '#value' => theme('term_display_'. $term_display_data['style'], $vocabulary, $terms),
    );
  }
}

Full node uses the style which is set in the vocabulary settings and teaser uses the list style.

rstamm’s picture

Status: Active » Fixed
rstamm’s picture

Title: How to make different display term in the teaser and the node » How to use different styles in teaser and full nodes

Or use the style "Load into $node" and theme the output in node.tpl.php

yasik’s picture

Big Big Thanks !!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.