interfx Posted March 23, 2020 Share Posted March 23, 2020 (edited) Is there a way to have flexibility on where the advertisement is placed in the sidebar? ie. is there a way to apply an advertisement block? that allows it to be at the bottom of my other sidebar blocks? I've added an advertisement below the header, and the side bar location - but's both advertisements side by side... Hope that explains it... Thanks in advance on how others have approached? Edited March 23, 2020 by interfx Link to comment Share on other sites More sharing options...
DawPi Posted March 24, 2020 Share Posted March 24, 2020 Edit sidebar template bit and change it: {{if $adsForceSidebar OR ( \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) AND ( ( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) OR ( isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) && \count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) ) )}} <div data-role='sidebarAd'> {advertisement="ad_sidebar"} </div> <br><br> {{endif}} {template="widgetContainer" group="global" app="core" params="'sidebar', 'vertical'"} To: {template="widgetContainer" group="global" app="core" params="'sidebar', 'vertical'"} <br><br> {{if $adsForceSidebar OR ( \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) AND ( ( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) OR ( isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) && \count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) ) )}} <div data-role='sidebarAd'> {advertisement="ad_sidebar"} </div> {{endif}} This operation change the location of sidebar ads from top to bottom. Pescao6 1 Link to comment Share on other sites More sharing options...
interfx Posted March 24, 2020 Author Share Posted March 24, 2020 (edited) Worked great! Thanks for sharing... Would be great if a future update would let users have a advertisement block that can be placed where you want it to be... Edited March 24, 2020 by interfx Link to comment Share on other sites More sharing options...
Recommended Posts