HH Services Limited Posted February 3, 2016 Share Posted February 3, 2016 (edited) I placed an image to the background of the prestashop default theme by pasting: background: #FFF url('../themes/default-bootstrap/img/cloud3long.png')!important; } to the global.css file in the css folder of my theme and after ofcourse uploading the image to the image folder of the theme. If I want this background image to appear in the home page only, how should I modify this code? Thank you Edited February 3, 2016 by De La Riviere (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 3, 2016 Share Posted February 3, 2016 If you just need to make change in homepage then you can edit below file /classes/controller/FrontController.php Search for function addMedia and add below code in it if($this->context->smarty->tpl_vars['page_name']->value == 'index') // checking if it is homepage echo "<style>#header_logo {display: none !important;}</style>"; We also has a module which allows you to add Custom CSS and JS on any specific page of your website. You can even decide that css should be apply to mobile or desktop or on both of them. Link to comment Share on other sites More sharing options...
HH Services Limited Posted February 4, 2016 Author Share Posted February 4, 2016 If you just need to make change in homepage then you can edit below file /classes/controller/FrontController.php Search for function addMedia and add below code in it if($this->context->smarty->tpl_vars['page_name']->value == 'index') // checking if it is homepage echo "<style>#header_logo {display: none !important;}</style>"; We also has a module which allows you to add Custom CSS and JS on any specific page of your website. You can even decide that css should be apply to mobile or desktop or on both of them. Sorry, but I tried as you said and it doesn´t work... Background image still appears in all pages, not just home page as intended. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 4, 2016 Share Posted February 4, 2016 The code we shared with you will either apply css to homepage or will not apply it at all. There is no way for it to apply css on all pages so please ensure that you have removed your code from global.css Link to comment Share on other sites More sharing options...
HH Services Limited Posted February 4, 2016 Author Share Posted February 4, 2016 Sorry and thanks for your reply, but I see no point in this code and after trying it in all possible ways, nothing happens in the front shop. My original question was: "I placed an image to the background of the prestashop default theme by pasting: background: #FFF url('../themes/default-bootstrap/img/cloud3long.png')!important; } to the global.css file in the css folder of my theme and after ofcourse uploading the image to the image folder of the theme. If I want this background image to appear in the home page only, how should I modify this code? Thank you" Are you sure that we are talking about the same thing? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now