I am using bartik theme. I have an image that I like to use as background of the home page only. Admin > appearance > Bartik > settings > I see different colors to set as background. Can I have an image as background instead of the color for the home page. And for other pages I can use a color.




unless you want to add it to a theme setting so that it can be adjusted by UI, the simplest way is probably to override page--front.tpl.php in your theme template directory, and manually add the html to create the background.

For more info on page template naming, see here.

| improve this answer | |

Consider using the ThemeKey module. From its project page (bold markup added here):

... allows you to define simple or sophisticated theme-switching rules which allow automatic selection of a theme depending on current path, taxonomy terms, language, node-type, and many, many other properties.

In combination with Drupal's theme inheritance you can easily achieve features like:

  • a front-page / "splash" screen
  • ...

So by creating a subtheme of the Bartik theme to be used on the home page, and another subtheme for all other pages, it should achieve your goal, no?

| improve this answer | |
  • Any feedback about this answer? – Pierre.Vriens Dec 5 '15 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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