I found this blog post on using this module to create a better navigation block for the book module: https://texascreative.com/blog/drupal-8-custom-table-contents-block-book... . That led me to the documentation here: https://www.drupal.org/node/1493366 and the section entitled, "Views Tree with Book module (to create book table of content - TOC)". I've tried following those instructions but they aren't working.

1) If you create a block display type, you can't choose "Tree (Adjacency model)" in step 5 because that views style is restricted to entity_reference displays.
2) Using the Tree (list) display works in a block but doesn't give the hierarchy.
3) Changing the annotation in TreeERSelection.php to "normal" display types allows it to be selected in a block display but it doesn't work properly (looks to be bypassing the theming completely).
4) Using an entity_reference display allows you to chose the style but then you don't have a block. Using views_embed_view() to display it doesn't work (again looks to be bypassing the theming).

This seems to have worked for the blog author 3 years ago but I am having no luck at all getting it to work now. I would have been happy to update the instructions had I figured it out but I am at a loss. Any suggestions? Thanks. :)

Comments

Michelle created an issue.

AliMartin’s picture

Hey Michelle. I was also having this problem, stumbled on your post here and kept on digging. Solution is here for you and anyone else looking to build a custom book navigation with extra fields, such as a teaser for each chapter:

https://www.drupal.org/node/1493366

Michelle’s picture

Thanks, AliMartin. Even though my question was 2 years ago, this was for a personal project, not a client, so I actually still could use this. I'll have a look at your solution soon as I get a chance to work on that site again.