Skip to main content
added 662 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I do this in Boost 7.x. It's not pretty, but it does get the job done.

hook_page_delivery_callback_alter

boost_page_delivery_callback_alter

boost_deliver_html_page()

boost_deliver_html_page() is on line 1181 of the above link (#l1181). I can't post more then 2 links due to spam prevention.

function boost_page_delivery_callback_alter(&$callback, $set = FALSE) {
  if ($callback == 'drupal_deliver_html_page') {
    $callback = 'boost_deliver_html_page';
  }
}

function boost_deliver_html_page($page_callback_result) {
  global $_boost;

  // Menu status constants are integers; page content is a string or array.
  if (is_int($page_callback_result)) {
    // @todo: Break these up into separate functions?
    switch ($page_callback_result) {

      // …

      case MENU_ACCESS_DENIED:
        // 403 page.
        $_boost['menu_item']['status'] = 403;
        break;

      // …

    }
    // …
  }
  // …   
}

I do this in Boost 7.x. It's not pretty, but it does get the job done.

hook_page_delivery_callback_alter

boost_page_delivery_callback_alter

boost_deliver_html_page()

boost_deliver_html_page() is on line 1181 of the above link (#l1181). I can't post more then 2 links due to spam prevention.

I do this in Boost 7.x. It's not pretty, but it does get the job done.

function boost_page_delivery_callback_alter(&$callback, $set = FALSE) {
  if ($callback == 'drupal_deliver_html_page') {
    $callback = 'boost_deliver_html_page';
  }
}

function boost_deliver_html_page($page_callback_result) {
  global $_boost;

  // Menu status constants are integers; page content is a string or array.
  if (is_int($page_callback_result)) {
    // @todo: Break these up into separate functions?
    switch ($page_callback_result) {

      // …

      case MENU_ACCESS_DENIED:
        // 403 page.
        $_boost['menu_item']['status'] = 403;
        break;

      // …

    }
    // …
  }
  // …   
}
added the link to the code for boost_deliver_html_page()
Source Link

I do this in Boost 7.x. It's not pretty, but it does get the job done.

hook_page_delivery_callback_alter

boost_page_delivery_callback_alter

boost_deliver_html_page()

boost_deliver_html_page() is on line 1181 of the above link (#l1181). I can't post more then 2 links due to spam prevention.

I do this in Boost 7.x. It's not pretty, but it does get the job done.

hook_page_delivery_callback_alter

boost_page_delivery_callback_alter

boost_deliver_html_page() is on line 1181 of the above link (#l1181). I can't post more then 2 links due to spam prevention.

I do this in Boost 7.x. It's not pretty, but it does get the job done.

hook_page_delivery_callback_alter

boost_page_delivery_callback_alter

boost_deliver_html_page()

boost_deliver_html_page() is on line 1181 of the above link (#l1181). I can't post more then 2 links due to spam prevention.

Source Link
mikeytown2
  • 8.3k
  • 1
  • 33
  • 46

I do this in Boost 7.x. It's not pretty, but it does get the job done.

hook_page_delivery_callback_alter

boost_page_delivery_callback_alter

boost_deliver_html_page() is on line 1181 of the above link (#l1181). I can't post more then 2 links due to spam prevention.