This module seems to be just what I needed. Thanks.

Everything seems to work fine, but I am not sure how to turn on the "from" and "to" node links: There does not seem to be a block that needs to be activated, or I am just missing some setting somewhere.

(Just FYI: As you noted, the Preview and Edit functions do not list the nodes that were already related.)

Comments

spinicrus’s picture

Your welcome, check the new version.

spinicrus’s picture

but I am not sure how to turn on the "from" and "to" node links

On "view" mode it displays related nodes FROM and TO that node - related nodes FROM and TO that node are combined. So, if the node your viewing has been related by another nodes(FROM), it will show up, or if the node your viewing is relating other nodes(TO). Hope this clears any confusion. :D

talatnat’s picture

Version: 5.x-1.x-dev » 5.x-7.1-2

I thought that is what should happen, but I don't seem to get these FROM and TO nodes to show up in the View mode.

I tried a clean Drupal install, turned on Related Item settings for Page content types, created two page nodes (titled Page one and Page two), and in the Related Items section of the Edit form gave each node the title of the other node. However, on View, the related FROM or TO nodes did not display for either node. I re-edited the nodes Related Items section using the node's URLs (instead of titles), but that, too, did not display the FROM and TO nodes.

I am using the 5.x-7.1-2 version from Apr. 10, and it shows the new SAVE button; however, the preview mode still does not show the Related Item.

datawench’s picture

i have the same set of questions. the process of assigning relationships seems nicely worked out, but i see no visible consequences. are the related node links just supposed to show up in the content body? is there any way to get them into a view-defined block?

spinicrus’s picture

hello all!

@talatnat:
on "view", the module lists only one relation between two nodes. that is because you'll have duplicate links if both relations were showed. However, this is good, because if you delete one of that two relations, the other one will show on "view", as a "backup".

@datawench:
the next v will have this feature. thanks for the suggestion.

cheers!

datawench’s picture

ok, but i still don't understand how to get the output of this module to show up on a story. it doesn't just show up by default, as far as i can tell, and something like this:

<?php
$rr = module_invoke('relateditems', 'block', 'view',1);
print $rr['content'];
?>

or even this (from trying to examine your code):

<?php
$rr = module_invoke('relateditems', $nid, 'view');
print $rr['content'];
?>

has no results.

so i'm able to use the utility to set up the relationships, but then i can't seem to make any use of them.
what am i missing?

spinicrus’s picture

@datawench:

try

$aViewRelatedItems = $node->relateditems['view'];
print_r($aViewRelatedItems);

so you can build your presentation as you wish,
or

$sRelatedItems = $node->content['relateditems_fieldset'];
echo $sRelatedItems;

to get the formatted html table.

a block featured version will come soon.
thanks for your feedback!

cheers!

datawench’s picture

almost... i have to dig just a little deeper into the output arrays to get at the necessary stuff, but those fragments are a great help.

i have something else, that i'll post as a separate issue.

summit’s picture

Subscribing, greetings, Martijn

kardave’s picture

Im a happy user of your module. How can i show up more than just the title?
I would need teaser list, or full node view.
Thanks.