Hi,

I'm fairly new to drupal but learning a lot each day.

I'm trying to show the content of a parent page plus say a list of child pages that have been assigned to the parent.
Both the parent and child pages will be the bog standard 'page' node.

What I am trying to do is have a page node called 'training' and then I want several other page nodes to be children of that page, each one containing information about a certain type of training. Then, when someone views the training page, I'd like to show the content of the training page followed by a list of links / teasers for the various child pages. Should this be possible with relativity.

Is there some way I can assign a page node to be the child of another page node? I've installed the relativity module and enabled it and have seen the basic config but I can't see how to relate one page to another. I only want to assign certain page nodes (not all page nodes in the site) to be children of another page node.

The example in the readme file seems to use different node types. Does the relativity module only work when relating different node types?

Many thanks

Comments

billybob4’s picture

Good news and bad news!

The good news is that I have found out how relativity module works and it does exactly what I want.

The bad news is the reason I couldn't work it out before is because the theme I am developing does not show any relativity stuff for some reason. As soon as I switched to garland I can attach child nodes etc. and view them. but in my own theme they don't show up, either in the admin views, or even when not in admin view. No sign of them in the source code in my theme.

I guess I'll be spending the day trying to work out how to get them to work within my theme. meantime if anyone has experienced anything similar I'd be grateful for a few pointers.

thanks

billybob4’s picture

Status: Active » Closed (fixed)

Sorted now.

It was because I had customised my node.tpl.php file to show the page content using:

print $node->content['body']['#value'];

rather than

print $content;

Using $content or the following (found on another post) gets me up and running:

print $node->content['relativity_parents']['#value'];
print $node->content['relativity_children']['#value'];
print $node->content['relativity_operations']['#value'];

Great module :)