Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
SJ77 Posted February 19, 2017 Posted February 19, 2017 I have ads showing on site but I want them to not show on certain pages.
TAMAN Posted February 19, 2017 Posted February 19, 2017 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}}
SJ77 Posted February 19, 2017 Author Posted February 19, 2017 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?
TAMAN Posted February 19, 2017 Posted February 19, 2017 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; }
SJ77 Posted February 20, 2017 Author Posted February 20, 2017 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?
TAMAN Posted February 20, 2017 Posted February 20, 2017 {{if \IPS\cms\Pages\Page::$currentPage->id == 1}} {advertisement="KEY"} {{endif}}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.