enricprestashop Posted February 12, 2014 Share Posted February 12, 2014 Hi I followed the steps mentioned in the following link to move the slider from the main content to the header: http://mypresta.eu/en/art/tips-and-tricks/how-to-move-image-slider-module-from-home-to-top-in-prestashop.html It is working perfectly, but now I would like to show the slider only when the user is in the main page. So when the user clicks on one category, the slider is hidden. How can I do this? Thank you Link to comment Share on other sites More sharing options...
vekia Posted February 12, 2014 Share Posted February 12, 2014 modules >positions search module on displayTop modules list, then click on edit button near it you will see there exceptions field, select all pages instead of "index" - then this module will appear only on index page (homepage) 2 Link to comment Share on other sites More sharing options...
enricprestashop Posted February 12, 2014 Author Share Posted February 12, 2014 Perfect! My consequent problem is that I set a background image for the slider and I need to make it disappear also. What I did was displaying a div with the background image I want set in the css file. I added the div code in the header.tpl file from my theme, after the code to verify the geolocation, as following: {if isset($restricted_country_mode) && $restricted_country_mode} <div id="restricted-country"> <p>{l s='You cannot place a new order from your country.'} <span class="bold">{$geolocation_country}</span></p> </div> {/if} <div id="fondo2"></div> The css used was: #fondo2 { background: url(../img/background-main-nav.png) repeat scroll center top rgba(0,0,0,0); width: 100%; height:36px; position:absolute; left:0px; top:100px; z-index:-1;} Is it possible I can hide it too? Link to comment Share on other sites More sharing options...
vekia Posted February 12, 2014 Share Posted February 12, 2014 use this code: {if $page_name=="index"} <div id="fondo2"></div> {/if} 1 Link to comment Share on other sites More sharing options...
enricprestashop Posted February 13, 2014 Author Share Posted February 13, 2014 Dziekuje bardzo!! SOLVED Link to comment Share on other sites More sharing options...
enricprestashop Posted February 14, 2014 Author Share Posted February 14, 2014 I realized that the "favourite_products" block is not included in the list from exceptions from the Image slider block. So when I display My favourite products page, the slider is displayed also, but not the background image. How can I solve it? Maybe i just need to write the name of this block in the exceptions, but I don't know the exact name. Link to comment Share on other sites More sharing options...
vekia Posted February 14, 2014 Share Posted February 14, 2014 i think that it will be much easier if you will add {if $page_name=="index"} MODULE TPL FILE CONTENTS {/if} to module homeslider.tpl file just replace MODULE TPL FILE CONTENTS with original contents of module file Link to comment Share on other sites More sharing options...
enricprestashop Posted February 17, 2014 Author Share Posted February 17, 2014 Perfect! 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