1 layout.theme.inc theme_layout_info($variables)

Outputs information about a layout. Used in the layout listing page.

Parameters

array $variables: An array with a single value: "layout", which contains the layout object.

Return value

string:

File

core/modules/layout/layout.theme.inc, line 48
Theme functions for the Layout module.

Code

function theme_layout_info($variables) {
  $layout = $variables['layout'];
  $info = layout_get_layout_template_info($layout->layout_template);

  // Build template thumbnail preview
  $preview_path = $info['path'] . '/' . $info['preview'];
  $preview_img = theme('image', array('path' => $preview_path));
  $preview = l($preview_img, 'admin/structure/layouts/manage/' . $layout->name, array('html' => TRUE));

  // Get the label and machine name.
  $label = theme('label_machine_name__layout', array(
    'label' => $layout->title,
    'machine_name' => $layout->name,
  ));

  $output = '<div class="layout-info">';
  $output .= $preview;
  $output .= '<div class="layout-detail">' . $label . '</div>';
  $output .= '</div>';

  return $output;
}