Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Nov 2010 at 17:59 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonI don't know -- are you asking a question or saying the documentation is incorrect?
Comment #2
nlambert commentedI'm suggesting that the documentation might be incorrect. I believe the node structure might be :
$page['content']['system_main']['nodes']... etc
I stumbled onto this while "moving" the advanced search form to another block... (the search form being within the same array as the nodes)
function cdm_page_alter(&$page) {
if (arg(0) == 'search' && arg(2)) {
$page['title_region']['search_form'] = $page['content']['system_main']['search_form'];
unset($page['content']['system_main']['search_form']);
}
}
Comment #3
chx commentedThat's correct.
Comment #4
jhodgdonOK, thanks! The hook_page_alter() documentation needs to be updated then. This would be a good project for a novice doc/patch contributor.
Comment #5
nlambert commentedI'm fairly new to this :-)
I guess I can start by reading...
http://drupal.org/contribute/documentation
Comment #6
amateescu commentedThis should do it.
@modesia, I suggest you read this also: http://drupal.org/node/707484
Comment #7
jhodgdonLooks reasonable to me, given the screen shot chx gave and the suggestion from the person who reported this issue.
Comment #8
amateescu commentedjhodgdon, I also tested this with dsm($page) in a hook_page_alter implementation and chx's screenshot is right.
Comment #9
jhodgdonGood. :)
Comment #10
nlambert commentedthanks amateescu, that documentation will definitely speed things up!
Comment #11
webchickNice catch!
Committed to HEAD. Thanks!