Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Chris027 Posted November 14, 2016 Posted November 14, 2016 Hi Guys - I want my custom block to appear above the sidebar advertisements. Here is a screenshot, with arrows, of what I'd like to switch. What are my options for switching the sidebar advertisement with a custom block?
sweethoney Posted November 14, 2016 Posted November 14, 2016 do you have portal you might can do it threw that
Chris027 Posted November 14, 2016 Author Posted November 14, 2016 54 minutes ago, sweethoney said: do you have portal you might can do it threw that What is portal?
sweethoney Posted November 15, 2016 Posted November 15, 2016 i have portal that my son friend got that he perches and he use it for his forums its ok
Nathan Explosion Posted November 15, 2016 Posted November 15, 2016 19 hours ago, Chris027 said: Hi Guys - I want my custom block to appear above the sidebar advertisements. Here is a screenshot, with arrows, of what I'd like to switch. What are my options for switching the sidebar advertisement with a custom block? You would need to edit the theme to switch those around - the sidebar is made up of Advertisements and then Blocks. You would be able to switch it to Blocks then Advertisements by editing the Core -> Front -> Global -> sidebar (there's an if/end if there that controls the position of the advertisement section.....just change it to position below the sidebar bit in there. Other options? Use a block to display the advertisement instead...modify the advertisement to use a custom location instead. Then create a block that has the content set to {advertisement="key_of_advertisement"} Result:
sweethoney Posted November 15, 2016 Posted November 15, 2016 here you can try this you can add it any where if you can get it 2 work <h3 class="ipsWidget_title ipsType_reset">YOUR TITLE</h3> <div class="ipsPad ipsWidget_inner" style="border: 0;padding: 0;"> YOUR CODE </div>
Chris027 Posted November 15, 2016 Author Posted November 15, 2016 OK, this is what's in my Core -> Front -> Global -> Sidebar right now. I can't see where to switch the Advertisement with the Block. Any help is appreciated. {{if (isset( \IPS\Output::i()->sidebar['enabled'] ) and \IPS\Output::i()->sidebar['enabled'] ) && ( ( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) || ( isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) && count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) || ( \IPS\Dispatcher::i()->application instanceof \IPS\Application AND \IPS\Dispatcher::i()->application->canManageWidgets() ) )}} <div id='ipsLayout_sidebar' class='ipsLayout_sidebar{$position} {{if !( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) && ( !isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) || !count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) && \IPS\Dispatcher::i()->application->canManageWidgets()}}ipsLayout_sidebarUnused{{endif}}' data-controller='core.front.widgets.sidebar'> {{if isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== ''}} <aside id="elContextualTools" class='ipsClearfix' {{if isset( \IPS\Output::i()->sidebar['sticky'] )}}data-ipsSticky{{endif}}> {expression="\IPS\Output::i()->sidebar['contextual']" raw="true"} </aside> {{endif}} {{if isset(\IPS\Output::i()->sidebar['widgets']['sidebar']) and count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) and ( \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) ) }} {advertisement="ad_sidebar"} <br><br> {{endif}} {template="widgetContainer" group="global" app="core" params="'sidebar', 'vertical'"} </div> {{endif}}
Nathan Explosion Posted November 15, 2016 Posted November 15, 2016 Advertisements are... {{if isset(\IPS\Output::i()->sidebar['widgets']['sidebar']) and count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) and ( \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) ) }} {advertisement="ad_sidebar"} <br><br> {{endif}} ...above the sidebar.... {template="widgetContainer" group="global" app="core" params="'sidebar', 'vertical'"} .....so swap them around.
Chris027 Posted November 15, 2016 Author Posted November 15, 2016 You're the best Nathan. Thanks so much.
Joel R Posted November 23, 2016 Posted November 23, 2016 4 hours ago, bern5 said: we can have custom sidebar blocks ?? Yes, if you have IP.Pages installed. Go to ACP > Pages > Blocks and create your own custom blocks, which can be used anywhere including the sidebar.
bern5 Posted November 23, 2016 Posted November 23, 2016 sorry i dont have pages. i thought you might have had some custom code i could insert
Recommended Posts
Archived
This topic is now archived and is closed to further replies.