You are here

function theme_panels_common_content_list in Panels 5.2

Same name and namespace in other branches
  1. 6.3 includes/common.inc \theme_panels_common_content_list()
  2. 6.2 includes/common.inc \theme_panels_common_content_list()
  3. 7.3 includes/common.inc \theme_panels_common_content_list()

Create a visible list of content in a display. Note that the contexts must be pre-loaded.

2 theme calls to theme_panels_common_content_list()
panels_mini_edit_form in panels_mini/panels_mini.module
Form to edit the settings of a mini panel.
panels_page_edit_form in panels_page/panels_page.admin.inc
The form to edit the page portion of a panel.

File

includes/common.inc, line 1506
Functions used by more than one panels client module.

Code

function theme_panels_common_content_list($display) {
  $layout = panels_get_layout($display->layout);
  $content = '<dl class="content-list">';
  foreach (panels_get_panels($layout, $display) as $panel_id => $title) {
    $content .= "<dt>{$title}</dt><dd>";
    if ($display->panels[$panel_id]) {
      $content .= '<ol>';
      foreach ($display->panels[$panel_id] as $pid) {
        $content .= '<li>' . panels_get_pane_title($display->content[$pid], $display->context) . '</li>';
      }
      $content .= '</ol>';
    }
    else {
      $content .= t('Empty');
    }
    $content .= '</dd>';
  }
  $content .= '</dl>';
  return $content;
}