0

I would like to ask for your help as I'm having a trouble in displaying some child pages of a particular Book in Drupal 8 using view. There's a book which displayed all the child pages but there's some book which displayed incomplete child pages and some book, doesn't display the child pages at all.

I created two views, one for the list of all top level book and the other one is for the child pages.

Here's what I have done on view settings:

to display the list of book:

Format: Unformatted list
Show: Fields
Filter Criteria: 
  Content Published (=Yes)
  Content: Content type (= Services)
  Book: Depth (= 1)
Sort Criteria: Content: Title (asc)

to display the child pages:

Format: Unformatted list
Show: Fields
Filter Criteria: Content Published (=Yes)
Sort Criteria: Content: Title (asc)
Contextual Filters: (Book Parent) Content: ID 
Relationships: Book Parent
Configure Relationship: Book Parent : Required this Relationship

After saving it, I added this to the block layout.

I'm not sure what went wrong on my settings.

Thank you in advance for you help!

1 Answer 1

1

I'm not too experience in Drupal. But normally I would not use Views for the child pages. If the book module is enabled, the BOOK NAVIGATION block will be available to list with hierarchy like a table of content. You can select in the option to display only for book pages under a particular book. Not sure whether this helps.

1
  • The book navigation displays the child pages in dropdown format only. Am I right? Because what I would like to achieve is a customize layout for child pages. E.g. it should be in Grid format and the image, title, and body will also display. I think this will be doable using views. Nov 19, 2019 at 6:50

Your Answer

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

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