I try show homebox for user on custom block. This is easy:


function mymodule_block_info() {
  $blocks = array();

  $blocks['mymodule-dashboard-block'] = array(
    'info' => t('MYMODULE USER: User dashboard block'),
    'cache' => DRUPAL_NO_CACHE,
  );

  return $blocks;
}

function mymodule_block_view($delta = '') {
  $block = array();

  switch ($delta) {
    case 'mymodule-dashboard-block':
      $block['subject'] = NULL;
      $block['content'] = array(
        '#markup' => mymodule_dashboard_block(),
      );
      break;
  }

  return $block;
}

function mymodule_dashboard_block() {
  $page = homebox_get_page('user_dashboard');
  return homebox_build($page);
}

But if i want ad new block to user dashboard, current page is always reload and redirect to user-dashboard page. If there other homebox tasks done by AJAX (order blocks, delete blocks) why add blocks not? I'm look at funcionality for adding new block and on the end of function function homebox_add_block() i see drupal_goto(homebox_get_path($page)).

Is there any way how to alter current $page path? I think AJAX saving and refreshing block would be better solution for this problem.

Comments

Anybody’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Please create a new Drupal 8+ (3.0.x) issue, referencing this one, if this is still relevant for Drupal 8+ (3.0.x).

As this issue was created for Drupal 7 which is close to EOL and won't receive any new features here anymore (unless someone implements them or sponsors development) I'm closing this issue for cleanup now.

If anyone works on this or has a solution, feel free to reopen! :)
Thank you.