Posted by mansspams on November 4, 2010 at 1:13pm
3 followers
| Project: | Panels Everywhere |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Letharion |
| Status: | needs work |
Issue Summary
In README.txt I see: In addition, before this is actually utilized you can use hook_panels_everywhere_contexts(&$contexts, $placeholders).
Is this hook supposed to work? It does not for me and I don't see it in code of Panels Everywhere. Maybe it's just outdated documentation or I am doing something wrong. Nothing happens with code below.
<?php
function MODULENAME_panels_everywhere_contexts(&$contexts, $placeholders) {
dsm($contexts);
dsm($placeholders);
}
?>
Comments
#1
is this the same?
_page_manager_contexts_alter(&$contexts, $placeholders)#2
Ah yes. It appears the README.txt misnames the hook. It's an _alter:
<?php// Allow other modules to also add contexts to the site template.
drupal_alter('page_manager_contexts', $contexts, $placeholders);
?>
So that would be hook_page_manager_contexts_alter(&$contexts, $placeholders);
#3
I am testing PA and it appears the docs are off, ill try to provide update when I wrap my mind around it :)
#4
Answered by merlin.
#5
It sounds like there's a doc update needed here.
#6
@merlinofchaos
Would you please verify that this gets it right? :)
#7
#8
You know, I think the documentation is right and the code is wrong.
the drupal_alter call should be adjusted. This really is a panels_everywhere specific set of contexts and should be namespaced accordingly.
#9