0

On any node in Drupal 7, I want to show a list of its child nodes. How do I do this? I basically want to create my own navigation system.

I'm still unfamiliar with the terms in drupal 7. I establish the hierarchy of nodes via the following steps:

  1. go to admin dashboard menu and click on "Add content"
  2. select the "Page" content type
  3. fill out the fields
  4. under "Menu settings," I select "Provide menu link"
  5. I choose the parent node under the "Parent item' drop-down menu
  6. save and publish
2
  • The question is quite vague. How do you define a page as child of another one? Are you referring to nodes, or something else?
    – apaderno
    Aug 2, 2011 at 19:41
  • @kiamlaluno - ok i added more info
    – John
    Aug 2, 2011 at 19:49

3 Answers 3

1

Out of the box, there is no concept of sub pages or child nodes in Drupal. What you refer to is the menu structure used for navigation. A node can have a menu items linking to it and menu items can be organized hierarchically. The system was not designed to create and define relation between nodes, but only for navigation. If you look at the API, there is no simple way to retrieve the children of a menu item.

The book module included in Drupal core can be used to create a hierarchical structure for nodes. There are other options such as the relation, references and node hierarchy modules.

0

I would look into using the Node Hierarchy module to manage the parent/child relationships, and then create a view that displays the child pages using the Views integration built into Node Hierarchy. This view could then be embedded in each parent using the Viewfield module.

0

The option "Menu settings->Provide menu link" is not creating a relation between nodes, it is just the reference to the menu system. If you want to make some reference between nodes you should use the References Module, but it probably not what you want.

before the navigation, you should concept a structure of your site, than you will see which is the easies to create your navigation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.