Closed (fixed)
Project:
RelatedContent
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 May 2008 at 08:19 UTC
Updated:
26 Jul 2009 at 07:10 UTC
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
Comment #1
TBarregren commentedGood idea. I will definitely consider it when I update the module next time.
Comment #2
open-keywords commentedHas this been committed ?
Comment #3
peter-boeren commentedI'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.
Comment #4
peter-boeren commentedmodule finally available with the suggested alteration in it.