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.
back_to_top module uses is_adminpage() for the admin page check. This is_adminpage() method checks if route contains admin route context not and based on that returns boolean. But there are situations where user need to add back to top on few admin pages not all.
This can be done by route subscriber to change admin_route option but doing this has its own problem. So there should be a way (alter hook in this case) which allows user to change the boolean return value for admin page.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2892237-2.patch | 476 bytes | joshi.rohit100 |
Comments
Comment #2
joshi.rohit100here is patch.
Comment #3
Chris Matthews CreditAttribution: Chris Matthews commentedReviewed and tested 2892237-2.patch, works for me.
Comment #5
acke CreditAttribution: acke at Happiness commentedIncluded in 8.x-1.0. Thanks for your help!