function panels_page_preview_page in Panels 6.2
1 string reference to 'panels_page_preview_page'
- panels_page_admin_dynamic_menu_items in panels_page/
panels_page.menu.inc
File
- panels_page/
panels_page.admin.inc, line 817 - panels_page.admin.inc
Code
function panels_page_preview_page($panel_page) {
return t('Dynamic previews have not yet been ported to Drupal 6. Expect them in a later alpha release.');
$args = func_get_args();
$panel_page = array_shift($args);
$load = new stdClass();
panels_page_load_include('render');
if (!($panel_page->load_flags & PANELS_IS_DYNAMIC)) {
if ((bool) panels_page_access($panel_page->name)) {
panels_page_fetch_primary_display($panel_page);
}
}
else {
$form_state = array(
'panel_page' => $panel_page,
'args' => $args,
);
$form_output = drupal_build_form('panels_page_admin_view_form', $form_state);
_panels_page_construct_argument_contexts($load, $panel_page, $form_state['args']);
}
panels_page_prepare_panels_render($load, $panel_page, $args);
// Render or provide an error based upon information in load?
// FIXME copied from the master loader; this NEEDS to be retooled for previews.
/* foreach ($panel_page->arguments as $id => $argument) {
$ignore = $argument['default'] == 'ignore';
$load_objects[$id] = array_shift($args);
$context = !empty($load_objects[$id]) ? panels_argument_get_context($argument, $load_objects[$id]) : PANELS_BAD_ARG;
if (!is_a($context, 'panels_required_context') && !is_a($context, 'panels_context')) {
if ($context & PANELS_USE_FALLBACK_ROUTER) {
if ($panel_page->load_flags & PANELS_HAS_FALLBACK_ROUTER) {
$loader_data['fallback'] = TRUE;
break;
}
else if ($ignore) {
continue;
}
}
// TODO Are there other cases? If not, this else is an unnecessary overspecification
else if ($context & PANELS_BAD_ARG && $ignore) {
continue;
}
// Bail out and 404 if we get this far.
// TODO should this 'business logic' be separated out?
drupal_not_found();
}
$panel_page->context[panels_context_id($argument, 'argument')] = $context;
}
_panels_page_prepare_render($panel_page);
*/
}