Saving node, get saved title
I have a trigger rule executing when a new node is saved.
I would like to take the node's title, modify it with PHP and save it into a CCK url field.
I know how to set up the correct action, but I cannot seem to be able to get the node's title into the PHP section.
<?php
return array(
0 => array('url' => $node->title),
);
?>It's working fine with:
<?php
return array(
0 => array('url' => 'test url'),
);
?>Which means I'm having difficulty getting the new node's title.
Any help with this would be VERY much appreciated. If this is the inappropriate section please kindly let me know where I should go :)
Thanks


input evaluation
oh, yes. The php-code field of cck doesn't support variables, as it's no input evaluation. But you can even use input evaluation in it, so you may use the token for the title or php code. YES - php code input evaluation in php code.. :D
E.g you could use php code like this:
Confusion
Wow, that really confused me.
I'll explain what I'm trying to do differently, slightly simpler.
I have a node. It has two fields:
- "title" (default)
- "custom" (cck text field)
Upon saving node, I want to perform the action "Populate field", on the "custom" field. I want to retrieve the value of "title" for use within the PHP input.
The use-case is, the title of the saved Node "This is a test node" will have a Rules generated field "http://www.example.com/This+Is+A+Tes" - I will need to use PHP string functions to modify the original title value.
At this stage I've seen the Computed Field module; I haven't looked into it yet... it may do what I want, but I feel that fewer modules => easier to manage => fewer problems.
And Rules is a great module. Thanks for your help.
EDIT: WOWWWWWW this is much simpler than I thought.
You might want to mention in the "Populate field" PHP input help-text that you can use Rules Tokens... The link to the devel.module really threw me off track. Basically all I needed was [node:title], instead of $node->title.
+++++++++++
I'm trying to send the body of a node in an email. I'm using the following code:
<?phpecho $node->body;
?>
However, it's not working.
Am I doing something wrong?
Cheers.
What about this?
http://drupal.org/node/453470