Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 19, 20178 yr I have ads showing on site but I want them to not show on certain pages.
February 19, 20178 yr If you simply want to hide it, you can target your advertisements by page module and page controller example, hide your advertisement on forums body[data-pagemodule="forums"] #your_advertisement_id{ display: none; } If you want your advertisement not to generate on certain pages then you have to use " Define your own locations " for your advertisement and manually pasting your advertisement somewhere like in globalTemplate example, show your advertisement everywhere but not forums {{if request.module == 'forums'}} {{else}} {advertisement="KEY"} {{endif}}
February 19, 20178 yr Author How about a way to make it not show in pages but only specific pages? {{if request.module == 'pages' and request.something = 'mypagename'}} {{else}} {advertisement="KEY"} {{endif}} almost there?
February 19, 20178 yr warp your advertisement in a div <div id='adver'> your advertisement </div> and add this to custom.css body[data-pagemodule="downloads"] #adver{ display: none; }
February 20, 20178 yr Author How about a way to make it not show in pages but only specific pages? {{if request.module == 'pages' and request.something = 'mypagename'}} {{else}} {advertisement="KEY"} {{endif}} almost there?
February 20, 20178 yr {{if \IPS\cms\Pages\Page::$currentPage->id == 1}} {advertisement="KEY"} {{endif}}
Archived
This topic is now archived and is closed to further replies.