Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to list all child pages of current parent page in drupal 7?

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 527
    Answer it

    Suppose I have parent pages A1 and B1. A1 has child pages A1.1, A1.2,A1.3 and B1 has child pages B1.1, B1.2. I want to list all the respective child pages on A1 and B1. In every child page I have an image and a title. These 2 information needs to be listed in the form of a teaser on the parent page. I need help in doing this whether by coding or by using views, I don't mind as far as I get the proper results.

    Thank you

 1 Answer(s)

  • Hi Shikha,

    There are 2 ways to do it:

    1: Use node reference: Install node reference module and create a node reference field in content type's manage field section. It will add option to select parent node (actually we are creating a reference). However node references is being deprecated now, so got to #2 for better flexibility.

    2: Entity reference: You can use "entity api" and "entity references (includes a "field") to create a reference for parent node .

    For displaying child pages within parent page, you can use back links views in default view section.

    For complete steps click here.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: