I'm trying to find out the current panel with php to integrate panels as context condition.
There was panels_page_get_current() but its not in panels and not in page_manager.
I really scanned code but couldn't find it out. The code is quite a lot of abstract :)
Comments
Comment #1
merlinofchaos commentedtry panels_get_current_page_display()
Sadly that only works for the display. It's possible that the handler should have a similar function in page manager. Though the 'page' object isn't always in use so that one's a little harder. (system pages don't have a page object at all).
Comment #2
dawehnerI had found the function before, but it does not contain anything about the panel itself :(
I thought of using the did and load the panel with the did, but sadly i think for stuff like context its not unique enough.
No Panel-id or something like $panel->name is in the output of panels_get_current_page_display();
Perhaps i couldn't find the value
Comment #3
merlinofchaos commentedThere isn't an owner->id set? If not that needs to be fixed.
Comment #4
dawehnerThats all i get
There is no such entry
Comment #5
merlinofchaos commentedThere is now a page manager function for this.
Comment #7
albert volkman commentedFor other internet searchers, I'm assuming the "page manager function for this" is-
http://www.drupalcontrib.org/api/drupal/contributions%21ctools%21page_ma...