While investigating #1394608: Make "Use this page in an admin overlay" option dependent on Overlay module I realized that the setting "Use this page in an admin overlay" doesn't really affect how the overlay is being used. That is, the overlay is used when the path starts with "admin" – regardless of this setting.
While I'm at it, I'd like to suggest that the option name should be:
Label: This is an administrative page
Description: This setting makes the page appear with the administration theme and in the admin overlay, if the site is set up to use these.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 1396212-4-admin_overlay_setting.patch | 1.66 KB | itangalo |
| #3 | ctools-admin-overlay-1396212-03.patch | 787 bytes | jhedstrom |
Comments
Comment #1
jhedstromI'm not positive if this works or not, but it might be as simple as implementing
hook_admin_pathsfor pages that have this option selected.Comment #2
jhedstromActually, it looks like this has been commented out since it slows performance so much. Presumably this hook is called on every page? Would caching page_manager's admin paths fix performance enough?
Comment #3
jhedstromHere's a patch that re-implements hook_admin_paths, but caches the results instead of processing them on every page load.
Comment #4
itangalo commentedConfirming that patch in #3 works.
Attached is a small extension of the patch, that also changes title and description for this option.
Comment #5
aschiwi commentedPatch in #4 works for me (Thanks!).
I had to apply the changes manually though, git apply -v didn't do anything, whether the patch was placed in ctools root directory or page_manager sub directory.
Comment #6
eclipsegc commentedThis is actually a duplicate of #1120028: Add caching to page_manager_admin_paths() for which I have a more comprehensive fix.