carplu Posted June 1, 2014 Share Posted June 1, 2014 Hi On certain pages i have a left or right sidebar in these sidebars are some blocks how can i exclude certain blocks from some pages example the blog block appears in every left sidebar, but i only want to show it on blog pages, and in turn i do not want to show other items on blog pages i know i can do something in 'positions' but when i want to do so, it also asks to hook it while that is already done Link to comment Share on other sites More sharing options...
PSfever.com Posted June 1, 2014 Share Posted June 1, 2014 (edited) Hi, there are three ways of doing this 1) You can disable certain pages right in the backoffice through positions as you stated 2) You can use CSS to hide it on certain pages. 3) You can edit it right in the tpl files (Not recomended, although sometimes necessary if there is no easier way of doing it) This is the CSS way. You will need to look into the source code of your website and check the value of the ID in the BODY TAG. In <Body id="Something">, the value would be Something. Let me give you an example. You want to have 3 columns on every page. Except for homepage. You open up your global.css file and write this (usually to the bottom of the page, however it does not really matter) body#index #left_column, body#index #right_column {display:none} body#index #center_column {width:100%} Edited June 1, 2014 by PSfever.com (see edit history) Link to comment Share on other sites More sharing options...
dioniz Posted June 1, 2014 Share Posted June 1, 2014 In BO > Modules > Positions find a module and click Edit. Then in Exceptions select pages for which you do not want the module to be displayed. Link to comment Share on other sites More sharing options...
carplu Posted June 1, 2014 Author Share Posted June 1, 2014 Thanks Dioniz, that was what i was looking for @psfever i know that it is possible to do with css, but it is not recommended to hide stuff... search engines don't like you doing that you know... so unless there is no other way i'd prefer not to use css to hide things Link to comment Share on other sites More sharing options...
carplu Posted June 1, 2014 Author Share Posted June 1, 2014 @ Dioniz Nope does not work In positions i go to module in displayRightColumn and click edit than i select cart, order but it is still in that sidebar in preferences i have force compile "on" and cache "no" Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2014 Share Posted June 1, 2014 hello in some templates left sidebar is right sidebar, and rigth sidebar i left sidebar can you share url, please? Link to comment Share on other sites More sharing options...
carplu Posted June 1, 2014 Author Share Posted June 1, 2014 Hi Vekia I understand, but that is not the case here because when i change the module position it does take effect, i just can't seem to exclude it from just this page i tried : cart, order here's the url http://wfltest.qxdev.nl/nl/snel-afrekenen Cheers Link to comment Share on other sites More sharing options...
PSfever.com Posted June 1, 2014 Share Posted June 1, 2014 That is odd, if you are against the CSS version, how about trying the drastic force of tpl conditioning? You will need to edit out the right column by putting this IF statement around it. Try it out and let me know. {if $page_name == 'index'} <div id="right_column">.....</div> {/if} Link to comment Share on other sites More sharing options...
carplu Posted June 1, 2014 Author Share Posted June 1, 2014 (edited) Well i am not against it, i was saying that it is a solution if nothing else would work... Changing the tpl is something i am not considering either because i would have to do that again on updates I hope i can do it the way described above that would be a clean solution But thanks anyway, i learned few things from your answer :-) Edited June 1, 2014 by carplu (see edit history) Link to comment Share on other sites More sharing options...
PSfever.com Posted June 1, 2014 Share Posted June 1, 2014 You're welcome, it's just that I don't know of any other solution...I don't like the .tpl editing either, but if nothing else works, that seems to me the only way to do this. Well, there is one more way which I thought of right now, you can create an override php file that would not be changed during any updates. In this file you would disable the loading of left and right column. But this already seems way more complicated than it should be. Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2014 Share Posted June 1, 2014 im back to this so, let's clarify you defined exception for these modules for quick order ? Link to comment Share on other sites More sharing options...
carplu Posted June 1, 2014 Author Share Posted June 1, 2014 (edited) you defined exception for these modules for quick order ? i have enabled right sidebar for "order" page so when on 1 page checkout the right sidebar is visible than i go to modules>positions in displayRightColumns for Tags blok i select edit on the next page is get this: module : tags blok hook in : displayRightColums (Right Column Block) In exclude i select: cart, order (i'm in dutch front end but this is in english so i selected both to be sure, but no result) quick order is not in the list Edited June 1, 2014 by carplu (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2014 Share Posted June 1, 2014 "orderopc" is there? if so - select it! you use one page checkout - am i right? Link to comment Share on other sites More sharing options...
carplu Posted June 1, 2014 Author Share Posted June 1, 2014 ah opc (one page checkout) didn't think of that... it worked, great thanks a lot!!! by the way, love your html pro module Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2014 Share Posted June 1, 2014 glad to hear that :-) and im also glad that i could help a little with this modules - positions thing ;-) i marked topic as solved. with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts