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.

Comments

jhedstrom’s picture

I'm not positive if this works or not, but it might be as simple as implementing hook_admin_paths for pages that have this option selected.

jhedstrom’s picture

Actually, 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?

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new787 bytes

Here's a patch that re-implements hook_admin_paths, but caches the results instead of processing them on every page load.

itangalo’s picture

StatusFileSize
new1.66 KB

Confirming that patch in #3 works.
Attached is a small extension of the patch, that also changes title and description for this option.

aschiwi’s picture

Patch 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.

eclipsegc’s picture

Status: Needs review » Closed (duplicate)

This is actually a duplicate of #1120028: Add caching to page_manager_admin_paths() for which I have a more comprehensive fix.