You are here

function panels_mini_add_page in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_mini/panels_mini.admin.inc \panels_mini_add_page()

Handle the add mini panel page.

1 string reference to 'panels_mini_add_page'
panels_mini_menu in panels_mini/panels_mini.module
Implementation of hook_menu().

File

panels_mini/panels_mini.module, line 420
panels_mini.module

Code

function panels_mini_add_page($layout = NULL) {
  panels_load_include('plugins');
  $layouts = panels_get_layouts();
  if ($layout === NULL) {
    foreach ($layouts as $id => $layout) {
      $output .= panels_print_layout_link($id, $layout, $_GET['q'] . '/' . $id);
    }
    return $output;
  }
  if (!$layouts[$layout]) {
    return drupal_not_found();
  }
  $panel_mini = new stdClass();
  $panel_mini->display = panels_new_display();
  $panel_mini->display->layout = $layout;
  $panel_mini->pid = 'new';
  $panel_mini->did = 'new';
  return panels_mini_edit($panel_mini);
}