I am trying to display the related content in a column on the right of my main content. I used the code from the documentation to paste into a block that displays the full node with all it's fields. I then went into my tpl file and started modifying what will display for it and all was working fine. Then After I attempted to relate nodes to another article, they both became unavailable. The browser gave an unknown error. I think drupal or mysql might be choking, but I'm not sure.

Is there a better way to accomplish what I am doing? I need to have control over what fields show, and like I said I can do this, but it seems hacky and obviously is crashing my pages.

This module is not useful just displaying the title of a node, so it is imperative I get this working. Any help would be greatly appreciated. Thank you.

CommentFileSizeAuthor
#1 Screenshot.png195.64 KBpeter-boeren

Comments

peter-boeren’s picture

StatusFileSize
new195.64 KB

When using the D6 version of this module there already is a default "related content block". You can use the code in function relatedcontent_block as an example. In hook_block the function _related_content_block() where the related information is gathered and the results are themed. You can copy and paste this code into your own custom module and alter the query to collect other fields and show them in a block.

In the screenshot you can see the results of the default block in the right sidebar

peter-boeren’s picture

Category: bug » support
Priority: Critical » Normal
peter-boeren’s picture

Status: Active » Closed (fixed)