aliosha Posted January 17, 2014 Share Posted January 17, 2014 Hello, I have a problem with the Home Slider that I am using. It appears in all pages, not only in homepage. I tried to set permissions for it in BO but no change. Any ideas? This is the store Link to comment Share on other sites More sharing options...
vekia Posted January 17, 2014 Share Posted January 17, 2014 what you exactly tried to do with "permissions" ? if i were you, i will use "exceptions" to dispaly page everywhere instead of "index" (modules > modules Positions > search for displayTop modules list > click edit near your slider module). Link to comment Share on other sites More sharing options...
Sharak Posted January 17, 2014 Share Posted January 17, 2014 Upload your /themes/your_theme/header.tpl here. Link to comment Share on other sites More sharing options...
aliosha Posted January 20, 2014 Author Share Posted January 20, 2014 what you exactly tried to do with "permissions" ? if i were you, i will use "exceptions" to dispaly page everywhere instead of "index" (modules > modules Positions > search for displayTop modules list > click edit near your slider module). Yes.. I tried this but it doesn`t work.. The slider still appears in pages set as exceptions. Link to comment Share on other sites More sharing options...
aliosha Posted January 20, 2014 Author Share Posted January 20, 2014 (edited) I tried to attach the header.tpl but it seems I`m not permitted to upload it. Edited January 20, 2014 by aliosha (see edit history) Link to comment Share on other sites More sharing options...
Sharak Posted January 20, 2014 Share Posted January 20, 2014 Add this code to /themes/ot_valupat/css/modules/othomeslider/bx_styles.css: #ot_slideshow { display: none; } #index #ot_slideshow { display: block; } It's not perfect solution because slider is still loaded on every page, what makes page load slighlty longer, but it makes slider visible only on homepage. Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 what theme you use? default one? open module .tpl file (homeslider.tpl), change code to: {if $page_name=="index"} <!-- Module HomeSlider --> {if isset($homeslider)} <script type="text/javascript"> {if isset($homeslider_slides) && $homeslider_slides|@count > 1} {if $homeslider.loop == 1} var homeslider_loop = true; {else} var homeslider_loop = false; {/if} {else} var homeslider_loop = false; {/if} var homeslider_speed = {$homeslider.speed}; var homeslider_pause = {$homeslider.pause}; </script> {/if} {if isset($homeslider_slides)} <ul id="homeslider"> {foreach from=$homeslider_slides item=slide} {if $slide.active} <li> <a href="{$slide.url|escape:'htmlall':'UTF-8'}" title="{$slide.description|escape:'htmlall':'UTF-8'}"> <img src="{$smarty.const._MODULE_DIR_}homeslider/images/{$slide.image|escape:'htmlall':'UTF-8'}" alt="{$slide.legend|escape:'htmlall':'UTF-8'}" height="{$homeslider.height|intval}" width="{$homeslider.width|intval}" /> </a> </li> {/if} {/foreach} </ul> {/if} <!-- /Module HomeSlider --> {/if} Link to comment Share on other sites More sharing options...
aliosha Posted January 20, 2014 Author Share Posted January 20, 2014 Add this code to /themes/ot_valupat/css/modules/othomeslider/bx_styles.css: #ot_slideshow { display: none; } #index #ot_slideshow { display: block; } It's not perfect solution because slider is still loaded on every page, what makes page load slighlty longer, but it makes slider visible only on homepage. Thank you! That is a good solution at least for the moment. Now it looks ok. The slider seems to be hooked in pages header instead of homepage content. In BO I can`t transplant it. Link to comment Share on other sites More sharing options...
aliosha Posted January 20, 2014 Author Share Posted January 20, 2014 what theme you use? default one? open module .tpl file (homeslider.tpl), change code to: {if $page_name=="index"} <!-- Module HomeSlider --> {if isset($homeslider)} <script type="text/javascript"> {if isset($homeslider_slides) && $homeslider_slides|@count > 1} {if $homeslider.loop == 1} var homeslider_loop = true; {else} var homeslider_loop = false; {/if} {else} var homeslider_loop = false; {/if} var homeslider_speed = {$homeslider.speed}; var homeslider_pause = {$homeslider.pause}; </script> {/if} {if isset($homeslider_slides)} <ul id="homeslider"> {foreach from=$homeslider_slides item=slide} {if $slide.active} <li> <a href="{$slide.url|escape:'htmlall':'UTF-8'}" title="{$slide.description|escape:'htmlall':'UTF-8'}"> <img src="{$smarty.const._MODULE_DIR_}homeslider/images/{$slide.image|escape:'htmlall':'UTF-8'}" alt="{$slide.legend|escape:'htmlall':'UTF-8'}" height="{$homeslider.height|intval}" width="{$homeslider.width|intval}" /> </a> </li> {/if} {/foreach} </ul> {/if} <!-- /Module HomeSlider --> {/if} Thank you for the quick replay. Is not the default one. Is OT Valupat and the module is OT Homeslider. Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 it's always worth to write detailed information about your module anyway, add this if condition: {if $page_name=="index"} CODE OF TPL FILE HERE {/if} to your module template file. Link to comment Share on other sites More sharing options...
aliosha Posted January 20, 2014 Author Share Posted January 20, 2014 it's always worth to write detailed information about your module anyway, add this if condition: {if $page_name=="index"} CODE OF TPL FILE HERE {/if} to your module template file. Thank`s again for your help! Seems to work fine. Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 im so glad that i could help a little i can go ahead and mark this topic as [solved] if you will need any additional assistace related to this case - just continue discussion below with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts