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?

有帮助吗?

解决方案

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. :)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top