Currently relatedcontent simply concatenates it's output to the body, in _relatedcontent_node_view, either before it or after it, depends on the user's choice.
They should be added independently, to allow greater control and customization.

Instead of (starting line 460 in version 5-x.1-6):

<?php
  // Theme the related content.
  $output = theme('relatedcontent', $output, $output_grouped, $node->type, $teaser, $page);

  // Add the themed output to the node's body.
  switch ($output_placing) {
    case 'beginning':
      $node->content['body']['#value'] = $output . $node->content['body']['#value'];
      break;
    case 'end':
      $node->content['body']['#value'] = $node->content['body']['#value'] . $output;
      break;
  }

?>

we should have:

<?php
  // Theme the related content.
  $output = theme('relatedcontent', $output, $output_grouped, $node->type, $teaser, $page);
  $node->content['relatedcontent']['#value'] = $output;
  
  // Add the themed output to the node's body.
  switch ($output_placing) {
    case 'beginning':
      $node->content['relatedcontent']['#weight'] = $node->content['body']['#weight'] - 1;
      break;
    case 'end':
      $node->content['relatedcontent']['#weight'] = $node->content['body']['#weight'] + 1;
      break;
  }

?>

Comments

TBarregren’s picture

Good idea. I will definitely consider it when I update the module next time.

open-keywords’s picture

Has this been committed ?

peter-boeren’s picture

I've done an implementation of your suggestion in the development version I'm working on at home for the D6 version of this module. It still needs a lot of love and attention but i hope all work is done before the end of january 09.

peter-boeren’s picture

Status: Active » Fixed

module finally available with the suggested alteration in it.

Status: Fixed » Closed (fixed)

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