Add a CTA Block in a Webflow CMS Collection

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น • 17

  • @alexsialenz
    @alexsialenz 2 ปีที่แล้ว +1

    Hahah this cracked me up about parks and rec 😂 also, I’ve always wondered how to do this!

  • @ArnauRos
    @ArnauRos 2 ปีที่แล้ว +1

    Just what I needed… 🤞🏻🚀

  • @bellomubarak3270
    @bellomubarak3270 2 ปีที่แล้ว +1

    I love this.

  • @Antihrupkost
    @Antihrupkost ปีที่แล้ว

    How to create CTA block on all width of screen?

  • @excmax
    @excmax 2 ปีที่แล้ว

    Cool trick! 👍 But how to make a new blog post always in the first position? 🤔 In your example it stays behind the CTA block, which is number 5. Is it any way to avoid manually re-ordering posts every single time? How to put the CTA block in the 5-th place no matter how many new blog cards come in? And make this behavior automatic?

    • @svetlanavokueva2751
      @svetlanavokueva2751 2 ปีที่แล้ว

      Agree, the first problem isn’t solved. I see only manual option to move new post in first place…

    • @NikolaiBain
      @NikolaiBain  2 ปีที่แล้ว +1

      Trust me, it's not a perfect solution and sadly there is no way around this! Played around for a while but found no answer

    • @excmax
      @excmax 2 ปีที่แล้ว +1

      @@NikolaiBain I see. Well, I think, this is time for custom code. 😁

    • @wearestudiotonic
      @wearestudiotonic 2 ปีที่แล้ว +1

      I suppose you could add an order number to every post but managing that would be quite annoying. Could put an intern on it though...

    • @NikolaiBain
      @NikolaiBain  2 ปีที่แล้ว

      @@wearestudiotonic Perfect solution hahah 😂

  • @realsamratc
    @realsamratc 2 ปีที่แล้ว

    But how to put one CTA with in a blog post details ?

  • @g4knr794
    @g4knr794 2 ปีที่แล้ว +1

    Good trick but probably isn’t best for SEO or screen readers given the CTA block is replicated so many times. It will also appear in the sitemap and get indexed by search engines.
    The best way to do this is to create the CTA block outside of the CMS collection then use some simple JS to move the component to the desired index of the collection

    • @NikolaiBain
      @NikolaiBain  2 ปีที่แล้ว

      Yo! Good recommendation, but I fix the SEO issues later in the video 😊 If you know the javascript needed to do that though, definitely drop it here so people have the option to do it this way!

    • @g4knr794
      @g4knr794 2 ปีที่แล้ว +2

      Ah sorry I didn’t see that part. The problem does remain with the cta block being present on the page many times (on every item, just hidden). It also leaves room for error as it would be easy to forget to add the filters or update them if the name changes, for example.
      I’ve typed out the below code on my phone so may not be 100% accurate but hope it helps someone!
      const ctaBlock = document.querySelector(‘#cta-block’)
      const collectionList = document.querySelector(‘#collection’)
      Let desiredIndex = 5 // your desired index
      collectionList.insertBefore(ctaBlock, collectionList.children[desiredIndex])

  • @MovieManUniversal
    @MovieManUniversal 2 ปีที่แล้ว +1

    But either way 🤣🤣🤣

    • @NikolaiBain
      @NikolaiBain  2 ปีที่แล้ว

      It's hard to make a video without messing up at least once 🙄

    • @MovieManUniversal
      @MovieManUniversal 2 ปีที่แล้ว +1

      @@NikolaiBain damn man you made my day!!!