I am setting up a site where the user will create a book from a link located in a side menu block titled " add book". Clicking on the link will open a content type that has a form I want the user to fill out. I am using fields provided in Drupal 7 to create the form. When they click on save the new book gets created using the module book made simple and it is added to a book block visible in the side menu. What I need to do is also create child pages under this new book.
I am creating a number of rules using the Rules module so that when an answer is selected in a field located in the main form a new node is created from a second content type. I created the content type and I was able to successfully test to see that I am able to create this new node automatically when a specific answer is given in one of the fields. However it does not appear as a child under the book automatically. I need to search in the content list and find the node then manually open and edit it to select and put it in the book. Then it appears under the book in the menu block as a child.
I actually want to add 5 to 25 child pages in the new book depending on the answers given in the form. Ideally I would like to add an action to the rule that will automatically create a new child under the book being created.
I am not really sure how to create a module to do this. However I am fairly sure it will involve the following:
-
Identifying the right book to add the child to. .. probably comparing a time stamp for the current user or pointing to the last book on the list.
-
Changing the node type to a child under the specific book selected....I have no idea how this is configured.
I bought a book to help me develop a new module. Drupal 7 module development I am willing to try to create a new module (my first). I just need someone with more experience to help me with the configuration and the how too`s.
Anyone interested in helping me and becoming a co-author?
Thanks,
spineless

Comments
Check out the online coding documentation!
There is quite good documentation in the Drupal handbooks for how to code for Rules 2 -- http://drupal.org/node/878720
You will need some coding skills to get started, so I definately recommend that you start experimenting with writing modules in general. (Drupal 7 module development will be of great help there, but it is mainly targeted to experienced Drupal users or developers.)
The online docs linked above is definately a good place to start. Also look around in the docs for pages that explain how to create a first module -- it will help you a lot.
Good luck,
//Johan Falk
I'm a part of the Rules Issue Squad, helping out in the issue queue. You can join, too!
Rules Components
Thanks a lot Johan,
I am expecting to write some code. The book Drupal 7 module development book describes the basic module design fairly well. The issues I have are related to how Drupal handles books and children. Can you answer some questions for me.
What is a child.... in coding terms? I know a child is a part of a book like a subsection that is associated with a specific book. But in Drupal coding terms is a child a content type? or is it a book type? How would I change a free standing node into a book or into a child? What variable would I set?
I found a section on the standard Drupal API reference. http://drupalcontrib.org/api/drupal
Can you point me to a similar document that describes the Rules module functions?
Thanks,
Spineless
spineless started a project
spineless started a project sandbox http://drupal.org/sandbox/spineless/1708678