I don't really know what to search for so I thought I'd ask.

I'm making a module for a custom node-type (yeah yeah CCK, sure, but I want my own module mmmkay? ;)) and I really really hate "name space pollution" or anything that might lead to it. So, I would like to somehow get all my data in the $node object to be in one member, array or object, rather than "flat".

Example:

//want this
$node->my_stuff['data_1'];
$node->my_stuff['data_2'];
//Dont want this...
$node->data_1;
$node->data_2;

But I cant see what I need to do, I have been trying various approaches to change stuff in hook_form to get what I want to appear in hook_insert to no avail. Any tips? Am I walking around on thin ice or?

Comments

JJacobsson’s picture

No responses tell me it's either

1. Impossible. Or at least harder than going to hell to rescue the soul of a loved one and returning to the land of the living to tell the tale.
2. So easy it's ridiculous I even asked.

Any tips on what's the right guess?

JJacobsson’s picture

I havent tried it yet, but it seems this does exactly what I want...