Basically, I'm trying to include an image and accompanying link a node (I'm starting with blog entries if that's any help). Since there's a chance the image/link will be reused in multiple blog posts I'm essentially after a one to many relationship.

Using CCK I've made a new content type for this image/link block. Then in the blog type I've added a noderef to link the two in a suitable manner. This sets up exactly the relationship I'm after, but it doesn't seem to have an obvious way of combining the nodes on the screen. Currently the blog node simply includes a link to the imagelink node while I want the actual content of the image link included in the content of the blog entry.

I've tried experimenting with the contemplate module but that doesn't seem to make any difference. IN the imagelink node I can edit the body/teaser/RSS to all have the display I want, but in the blog node I can't seem to find a way to actually call on those parts, the only variable I can find simply grabs the link to the included node like this:

$node->content['field_imagelink']['#value'] 
<div class="field field-type-nodereference field-field-imagelink"><div class="field-items"><div class="field-item"><a href="/node/9">Life Sucks</a></div></div></div>

Instead of the link I just want to include the other node, or even to have access to the variables of that node so I can then create the output I'm after directly in the blog node.

I'm wondering if I'm even on the right path for achieving this. It seems to be doing so much of what I'm after but I can't find a way to get that last, important, piece of the puzzle. Any help or suggestions would be appreciated.

Thanks

Comments

caomhin’s picture

Fwiw I couldn't find a logically way to do what was required so I ended up making a new module. I suspect there's a better way within the current software but it eluded me to the point that it seemed easier to just start again.