I just got to know drupal a while ago and first of all I would like to say that I am very impressed with drupal and its flexibility.

However, during the last week I have been building a web site. I need have several different content types in a single
book and to have the end user the ability easily add any content type to the book. That is, of course, possible with
the outline function of the book, but I don't really like the HMI. Instead of making to user first define the content
and then use to outline function and to choose the right node himself with the outline function, I would like to have same kind of interface the book has: just links on the page of the parent for adding child nodes of each content type.

I searched the forums and couldn't find a solution. So I ended up building a small module which allows for this alternative
way of building books of any content type.

The module uses a specially named vocabulary for the contenthierarchy. For example, vocabulary could be something like this:

- Continent
          - Country
                   - Capital
                   - County
                   - City
          - Lake
          - River

Now, if the user defines content types Continent, Country, Capital...., and starts adding content, then the module will add links
"Add Country", "Add Lake" and "Add River" for the nodes of type "Continent" and links "Add Capital", "Add County" and "Add City" for the nodes of type "Country". These links will initiate creation of a new node and after the user submits the new node, the module
will automatically add the nodes to a book. So it works exactly like the user were adding a child to a book.

Now, I have a few questions:
- Do you feel this is generally useful functionality? Personally, I think that are quite a few situations where this kind HMI is more
desirable than the one provided by the outline function
- If yes, should this be contributed to some module or should it be a separate module? At the moment the module is a bit rough
around the edges, but I would be willing to polish it, if it is useful. The module is dependent on node, taxonomy and book.

Antti

Comments

kerola’s picture

Just a clarification, in the first post the example hierarchy get messed up:
It should look like this:

  • Continent
    • Country
      • Capital
      • County
      • City
    • Lake
    • River
kerola’s picture

I found a module which does everything my small module does and a lot more. It is called node relativity. This
is the link to the home page: http://drupal.org/project/relativity

Excellent!

There is a also an article on a core developing to a similar direction here:
http://drupal.org/node/128731.

For a moderator:
I think it would make sense to move this thread to an appropriate support forum. I am sorry
for bothering another forum with this. I was unlucky with my search key words and could not
originally find the module which would have solved my problem.

Antti

ray007’s picture