0

Hi I am using a modified bartik theme, and I want to change around the body.

I've been trying to change it using variations of the following, since that's what most of the doc. says to do, but it doesn't work.

function bartik_preprocess_html(&$variables) {
  $variables['theme_hook_suggestions'][] = 'html__node__7';

Any ideas?

eddyrolo
  • 347
  • 1
  • 6

1 Answers1

2

In your bartik theme folder there is a function named bartik_process_page(&$variables) .But I have to say try copying your theme to the sites/themes folder if you have to change or alter any theme.Inside this function place the $variables['theme_hook_suggestions'][] and specify the required tpl.php file for your purpose.For example

function bartik_process_page(&$variables) {

   $variables['theme_hook_suggestions'][] = 'html__test'; //Place your code here

I have a file named html--test.tpl.php in my bartik folder.Try clearing the cache and run. :)

Nibin
  • 3,922
  • 2
  • 20
  • 38
  • I've tried this and it doesn't work. Maybe not using a subtheme has something to do with it. I know it's not the best practice but shouldn't it work regardless? I have successful overridden page.tpl.php but html.tpl.php no such luck. – eddyrolo Oct 05 '13 at 07:09
  • Thank you, yes this worked, but only after I created my own subtheme. – eddyrolo Oct 08 '13 at 00:14