Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 8 core book module adds the Book navigation - previous / next links via hook_ENTITY_TYPE_view().
book_node_view()
Display suite module as this field via Drupal\ds\Plugin\DsField\Book\BookNavigation class however it doesn't not show on non-book types (Drupal core does) and does not show on default view mode either.
Joshua.
Comment | File | Size | Author |
---|---|---|---|
#8 | 3118182-8.patch | 568 bytes | swentel |
#2 | ds-book-navigation-previous-next-display-suite-layout-3118182-1.patch | 1.07 KB | silverham |
Comments
Comment #2
silverham CreditAttribution: silverham at EY Digital commentedAfter checking the code, there a ds field BookNavigation.php, however it only show on book types, not any content types.
Drupal core allow any type to be part of a book. Even Drupal core book module will add these previous/next button to a node view.
@see
Especially since migrating sites, with standard pages as part of a book on D7 site.
Additionally, the field doesn't show on the default view_mode.
Attached is patch to fix this.
Comment #3
silverham CreditAttribution: silverham at EY Digital commentedComment #4
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedHmm, but there's a setting at admin/structure/book/settings.
If I don't toggle the content type to be part of a book, I don't see the navigation in core either (even though I can add it to the outline as an admin). So, I still think it's ok no?
(note, the default/view is a bug indeed, that should be fixed)
Comment #5
kwfinken CreditAttribution: kwfinken at Michigan State University for Michigan State University commented@swentel
There is that setting in admin/structure/book/settings. When display suite is not active for a content type, that admin setting works. When display suite is enabled for a content type, that setting is ignored and book related items only shown on the "book" content type. I will download and review the patch sometime today.
Comment #6
kwfinken CreditAttribution: kwfinken at Michigan State University for Michigan State University commentedThe patch did not work on my system
Comment #7
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedComment #8
swentel CreditAttribution: swentel at eps & kaas commentedallow default and full
Comment #10
swentel CreditAttribution: swentel at eps & kaas commentedcommitted and pushed.
listens to default and view and the setting of book types, while I know that it's possible to for admins to add any, I rather want to follow the settings. If someone want to override it (or make available on other content types), you can create a new field simply.
Comment #11
swentel CreditAttribution: swentel at eps & kaas commentedComment #12
swentel CreditAttribution: swentel at eps & kaas commentedActually, scratch my last comment, it's available on any content type now ..
Comment #13
swentel CreditAttribution: swentel at eps & kaas commentedComment #15
swentel CreditAttribution: swentel at eps & kaas commentedComment #16
swentel CreditAttribution: swentel at eps & kaas commented