Implements hook_render_template().
string $template_file: The filename of the template to render.
mixed[] $variables: A keyed array of variables that will appear in the output.
string The output generated by the template.
function nyan_cat_render_template($template_file, $variables) {
$output = str_replace('div', 'nyancat', file_get_contents(DRUPAL_ROOT . '/' . $template_file));
foreach ($variables as $key => $variable) {
if (strpos($output, '9' . $key) !== FALSE) {
$output = str_replace('9' . $key, $variable, $output);
}
}
return $output;
}