How to make automatic creation of an album at creation node that the album name was same as well as at node

Comments

jeremy_a’s picture

You can do this with the Rules module.

Screen-ager’s picture

Please explain as it to make

jeremy_a’s picture

Enable PHP filter in modules. In Rules, choose:

Event: After saving new content
Condition: Node has type [choose node type x]
Action: Add new content
Put a dummy title in
Content to be used: Album
Action: Execute PHP code:

$node_added->title = $node->title;
return array('node_added' => $node_added);

Now every time you add new content of node type x, there will be an album photos node with the same title.

Screen-ager’s picture

Very BIG thanks!!! :)

nathaniel’s picture

Status: Active » Closed (fixed)