Creating a Call to Action Block in Webflow: A Step-by-Step Guide

Published on
March 13, 2022

How to Create a Call to Action Block in Webflow

In this tutorial, we will learn how to create a call to action block within a CMS collection in Webflow. This will allow us to seamlessly integrate a call to action block within our collection of posts, displaying it exactly where we want and hiding it where we don't.

Step 1: Creating a New Item in the CMS Collection
First, we need to create a new item in our CMS collection. To do this, navigate to your CMS collection (in this case, "blog posts") and add a new item called "call to action" or "CTA." Once the new item is added, go back to the collection to proceed.

Step 2: Setting Up Conditions for Visibility
When adding the new item to the collection, we will notice that it's currently empty. To address this, we will set up a condition to control its visibility. This involves adding a div block and setting conditions for when it should be visible.

First, we set up a card for the blog post information, where we add a condition to hide the element when the name does not equal "CTA." Then, we add a div block and set conditions so that it's only visible when the name equals "call to action."

Step 3: Styling the Call to Action Block
Now that we have set up the conditions, we can start styling the call to action block. Add a div block and name it "call to action blog card." Give it a colored background, set the border radius, and add padding to create the desired appearance.

Next, add the content to the call to action block, including a header, paragraph, and an email form. Customize the content as needed, and ensure that it's distinct from the post summary and title to make it unique for the call to action block.

Step 4: Ordering the Call to Action Block
To order the call to action block within the collection, we will add a new field to the CMS collection. In the collection settings, add a new field and make it a number field named "order." This field will determine the position of the call to action block within the collection.

Save the collection after adding the new field. Then, assign order values to the items in the collection to specify their positions. For example, give the call to action block an order of 2, setting it as the second item in the collection. Adjust the order values accordingly to position the call to action block as needed.

Step 5: Sorting the Collection List
To ensure that the items are displayed in the correct order, we'll add a sort order to the collection list. In the collection list settings, add a sort order based on the "order" field, sorting from largest to smallest. This will arrange the items according to the order values assigned.

By adjusting the order values, we can easily move the call to action block within the collection. Adding more items with lower order values will shift the call to action block further down the collection list.

Step 6: Addressing Additional Considerations
Before finalizing the setup, there are a few more considerations to address:

  1. Order of Blog Posts: If new blog posts are falling to the end of the collection, add a sort order based on the creation date, sorting from newest to oldest. This ensures that the most recent posts appear after the call to action block, maintaining the desired sequence.

  2. Hiding the Call to Action Block: To prevent the call to action block from appearing in unwanted places, such as on the homepage or in related posts, apply filters to the respective lists. Set filters to ensure that items where the name does not equal "call to action" are displayed, effectively hiding the call to action block where necessary.

  3. Disabling Search Engine Indexing: Disable search engine indexing for the specific page created for the call to action block. This prevents the page from being indexed by search engines while still allowing it to function within the collection.

Final Steps
Once these considerations are addressed, the call to action block is successfully integrated into the CMS collection. The visibility and positioning are controlled, ensuring that it appears only where intended. The setup is now complete, and the call to action block is effectively styled, ordered, and managed within the collection.

In conclusion, integrating a call to action block within a CMS collection in Webflow offers flexibility and control over the content presentation. By following the steps outlined in this tutorial, you can seamlessly implement and manage the call to action block, enhancing the user experience and engagement on your website. Thank you for following along, and feel free to explore other video tutorials or leave a recommendation for future topics in the comments below.