| 6 theme.inc | theme_render_template($template_file, $variables) |
| 7 theme.inc | theme_render_template($template_file, $variables) |
| 8 theme.inc | theme_render_template($template_file, $variables) |
Render a system default template, which is essentially a PHP template.
Parameters
$template_file: The filename of the template to render.
$variables: A keyed array of variables that will appear in the output.
Return value
The output generated by the template.
1 string reference to 'theme_render_template'
File
- includes/
theme.inc, line 1410 - The theme system, which controls the output of Drupal.
Code
function theme_render_template($template_file, $variables) {
extract($variables, EXTR_SKIP); // Extract the variables to a local namespace
ob_start(); // Start output buffering
include DRUPAL_ROOT . '/' . $template_file; // Include the template file
return ob_get_clean(); // End buffering and return its contents
}
Login or register to post comments