SJ77 Posted February 19, 2017 Share Posted February 19, 2017 I have ads showing on site but I want them to not show on certain pages. Link to comment Share on other sites More sharing options...
TAMAN Posted February 19, 2017 Share 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}} Link to comment Share on other sites More sharing options...
SJ77 Posted February 19, 2017 Author Share 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? Link to comment Share on other sites More sharing options...
TAMAN Posted February 19, 2017 Share 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; } Link to comment Share on other sites More sharing options...
SJ77 Posted February 20, 2017 Author Share 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? Link to comment Share on other sites More sharing options...
TAMAN Posted February 20, 2017 Share Posted February 20, 2017 {{if \IPS\cms\Pages\Page::$currentPage->id == 1}} {advertisement="KEY"} {{endif}} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.