1 layout.theme.inc | theme_layout_template_info($variables) |
Outputs information about a layout template . Used in the layout template listing page.
Parameters
array $variables: An array with a single value: "template_info", which contains information about the layout template.
Return value
string:
File
- core/
modules/ layout/ layout.theme.inc, line 131 - Theme functions for the Layout module.
Code
function theme_layout_template_info($variables) {
$template_info = $variables['template_info'];
// Build template thumbnail preview.
$preview_path = $template_info['path'] . '/' . $template_info['preview'];
$preview_img = theme('image', array('path' => $preview_path));
// Get the label and machine name.
$label = theme('label_machine_name__layout_template', array(
'label' => $template_info['title'],
'machine_name' => $template_info['name'],
));
$output = '<div class="layout-info">';
$output .= $preview_img;
$output .= '<div class="layout-detail">' . $label . '</div>';
$output .= '</div>';
return $output;
}