metalice Posted June 16, 2012 Share Posted June 16, 2012 hello, i have a free block module that hook to the right column, i would like this module not to appear in 5 categories. how do i do it? in the positions exceptions its written to exclude only base files with .php ending... so how can i exclude this module? thanks! Matan Link to comment Share on other sites More sharing options...
nadie Posted June 16, 2012 Share Posted June 16, 2012 hello, i have a free block module that hook to the right column, i would like this module not to appear in 5 categories. how do i do it? in the positions exceptions its written to exclude only base files with .php ending... so how can i exclude this module? thanks! Matan You can try to edit the tpl module in question and do the following: {if $smarty.get.id_category == 'X'} code_module {/if} 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 16, 2012 Share Posted June 16, 2012 Yeah that works! More about in this thread, http://www.prestashop.com/forums/topic/39745-solved-adding-categories-as-exception-to-show-a-block-module-or-how-to-display-a-module-block-only-in-one-category/ Link to comment Share on other sites More sharing options...
jmktpa Posted July 16, 2013 Share Posted July 16, 2013 Does anyone know if something has changed in PrestaShop Version 1.5? I cannot get the code to work. I add {if $smarty.get.id_category == 'X'} to the top of the TPL file and {/if} at the bottom but it does not cause the module to hide - the module continues to display on every category and every page. I did turn on Force Compile and turned off the Cache. Thanks very much for any help! Link to comment Share on other sites More sharing options...
PascalVG Posted July 17, 2013 Share Posted July 17, 2013 Hi JM, Which file did you try to change exactly to get the result? Is there maybe an overriding file of it elsewhere which is used instead? (Just double check: Did you change the 'X' into the category ID number of the category you want to make it show?) My 2 cents, pascal Link to comment Share on other sites More sharing options...
jmktpa Posted July 24, 2013 Share Posted July 24, 2013 Thank you for replying. I changed the TPL file. I am not sure if there is an overriding file - is there somehow I can find out? Yes I did change the X - I tried '4'. Thanks again! Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 try to recompile the smarty templates turn off cache run force compilation and check again Link to comment Share on other sites More sharing options...
Recommended Posts