0
<?php print $site_name; ?>

Why I couldn't perform the above code in 'html.tpl.php'. This works find in page template. Please suggest how to load this in html template

1 Answer 1

0

There's no $site_name variable added to html.tpl.php, but you can add it yourself quite easily with a preprocess hook:

function MYTHEME_preprocess_html(&$vars) {
  $vars['site_name'] = variable_get('site_name', 'Default');
}
1
  • Thank you Clive. Site name the name of value entered in "admin/config/system/site-information" <?php print $site_name; ?> Commented Jan 14, 2014 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.