Hi,

I need to programmatically add a child menu item when creating content.
I have the parent item "events", and would like to have the event (title) added under it when first creating, and saving the content (events content type).

I tried few combinations of rules module, but I am missing something (read I don't know what I am doing).

Woul someone kindly give me a step by step guide, i.e.
1 - react on event > node > after saving new content
2 - ...
3 - ...
4 - ...
X - save

Thank you

Comments

nevets’s picture

You can directly add the new node to the menu when adding the content under the vertical tabs.

Using rules it looks like you would need Menu Rules

keneso’s picture

Thank you.

I know, but I am afraid that some of people who will create content will overlook that, sometimes happened to myself during the testing ...
A couple months ago I tried menu rules, but as far as I remember it didn't do it - maybe I had not rules installed (pc crashed, and lost all the old tests), anyhow I'll give it another try.

Still if someone can guide me for the rules modle I appreciate it.

keneso’s picture

It turns out in my previous test I had not installed rules module, imported menu rules sample, and works as expected.

Thank you again nevets.