Jordan Miller Posted May 19, 2020 Share Posted May 19, 2020 Hi there. I was thinking... it would be awesome if there was a way to somehow incorporate an "offset" feature into blocks. So you could set up Blocks like this: 5 Featured Topics block (most recent topics 1-5) 1 Calendar event Next 5 Featured Topics block (most recent topics 6-10) Advertisement Next 5 Featured Topics block (most recent topics 11-15) Thoughts? opentype and AlexJ 2 Link to comment Share on other sites More sharing options...
Jordan Miller Posted June 17, 2020 Author Share Posted June 17, 2020 (edited) Awe, I forgive you guys for missing this. It's ok. Just going to bump. 🤓 Basically, I need a way to insert ads every 6 posts on my homepage, but can't currently. Any ideas? Edited June 17, 2020 by breatheheavy Link to comment Share on other sites More sharing options...
bfarber Posted June 18, 2020 Share Posted June 18, 2020 It's doable with template edits and custom advertisement locations. We've done similar things for custom themes for our enterprise-level services. Jordan Miller 1 Link to comment Share on other sites More sharing options...
Jordan Miller Posted June 19, 2020 Author Share Posted June 19, 2020 12 hours ago, bfarber said: It's doable with template edits and custom advertisement locations. We've done similar things for custom themes for our enterprise-level services. Interesting! But I’m using the SuperBlocks application to display the news. Possible to still do it? Link to comment Share on other sites More sharing options...
borangeatx Posted September 16, 2020 Share Posted September 16, 2020 Hi, Any luck figuring this out? Link to comment Share on other sites More sharing options...
Management Matt Posted September 16, 2020 Management Share Posted September 16, 2020 Link to comment Share on other sites More sharing options...
Jordan Miller Posted March 15, 2021 Author Share Posted March 15, 2021 On 9/16/2020 at 8:48 AM, Matt said: Still dreaming of this idea 🤠 Link to comment Share on other sites More sharing options...
Morrigan Posted March 15, 2021 Share Posted March 15, 2021 (edited) Still doable with Superblocks. You need to do some counting. Basically something at the end of each Foreach that is like: {{$adcount=++;}} {{if $adcount = 5}} Insert code {{elseif $adcount=10}} Insert Code {{endif}} Edited March 15, 2021 by Morrigan Link to comment Share on other sites More sharing options...
Jordan Miller Posted March 15, 2021 Author Share Posted March 15, 2021 1 hour ago, Morrigan said: Still doable with Superblocks. You need to do some counting. Basically something at the end of each Foreach that is like: {{$adcount=++;}} {{if $adcount = 5}} Insert code {{elseif $adcount=10}} Insert Code {{endif}} Ahhh interesting. Can this work with SuperTopics? Link to comment Share on other sites More sharing options...
Morrigan Posted March 15, 2021 Share Posted March 15, 2021 It should work for anything that has a foreach in order to loop the items. Jordan Miller 1 Link to comment Share on other sites More sharing options...
opentype Posted March 15, 2021 Share Posted March 15, 2021 Well, the logic works, but the mentioned products create grid child elements with each loop, so throwing ads in there at random points will probably break the layout. So the IF query would also need to end the grid container first and potentially start a new one after the ad. Morrigan and Jordan Miller 2 Link to comment Share on other sites More sharing options...
Morrigan Posted March 15, 2021 Share Posted March 15, 2021 (edited) 22 minutes ago, opentype said: Well, the logic works, but the mentioned products create grid child elements with each loop, so throwing ads in there at random points will probably break the layout. So the IF query would also need to end the grid container first and potentially start a new one after the ad. That's why I just put "Insert code" Since I don't know the templates I couldn't be more helpful than that. I also don't know if they want to add the advertisement as a grid item SO! There are a few factors there to consider. Edit: I don't know the specifics because I didn't design the templates. 😉 But giving the basic overview of what is needed to accomplish what they want. Edited March 15, 2021 by Morrigan Link to comment Share on other sites More sharing options...
Jordan Miller Posted March 16, 2021 Author Share Posted March 16, 2021 19 hours ago, opentype said: So the IF query would also need to end the grid container first and potentially start a new one after the ad. 😍 If I understand correctly, one would (in theory) use multiple blocks to display the topic items? supertopic 1 block ad supertopic 2 block ad etc? Link to comment Share on other sites More sharing options...
Pavel Chernitsky Posted March 16, 2021 Share Posted March 16, 2021 I was actually wanting to implement something very similar a few years back when we were thinking about doing a re-design for the homepage. We wanted to have an infinite scrolling homepage that integrated threads and other noteworthy content from our community together with news articles and other stuff from our editorial website, and intermittent ads tossed in every few content "rows". Unfortunately, we've since shelved this idea due to various unrelated issues. But I did have a very rough illustration of this setup. Sorry in advance for the Hebrew text. I'm too damn lazy to remove it just to post it here 😅 Jordan Miller 1 Link to comment Share on other sites More sharing options...
Recommended Posts