2

I'm creating a page with a form with the hook_menu:

function my_module_menu() {
  $items['rsvp'] = array(
    'title' => 'My Page',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('my_module_form_search'),
    'access arguments' => array("access content"),
    'access callback' => TRUE,
  );
}

I also have created a block that is to display in the content area of the rsvp page. Right now the form shows above the block. How do I reverse that?

1 Answer 1

2

In Drupal 7 the output from a page callback will be rendered inside the standard 'Main page content' block. As such it is available to be re-ordered like any other block in the system through the admin UI.

All you need to do is visit the administer blocks page ( http://mysite.com/structure/block ) and move your block above the 'Main page content' block.

1
  • Well I feel stupid now. I can't believe I didn't notice that. Thank you! Commented Apr 28, 2012 at 0:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.