Webflow sync, pageviews & more.
NEW

Can I dynamically display the number of articles by each author on a Webflow site using collections?

TL;DR
  • Create Authors and Articles CMS collections, linking Articles to Authors via a Reference Field.
  • Display a Nested Collection List inside the Authors Collection List to show related articles.
  • Manually track article counts with a Number Field in the Authors collection.
  • Use JavaScript to count and display the number of articles per author dynamically.
  • Alternatively, automate article count updates with Zapier or Make (Integromat).

Yes, you can dynamically display the number of articles each author has published using Webflow CMS Collections. However, Webflow does not have built-in support for counting related collection items directly. You'll need to use a CMS Reference Field and either a custom JavaScript solution or an embedded third-party tool.

1. Set Up Your Collections

  • Ensure you have two CMS Collections: Authors and Articles.
  • In the Articles collection, create a Reference Field linking to the Authors collection.

2. Display Articles Under Each Author

  • Create a Collection List on your Authors page.
  • Inside the list, insert a Text Block for the author's name.
  • Add another Collection List (Nested Collection) to this, filtering Articles where the Author reference matches the current Author.

3. Manually Count Articles (Workaround)

  • Webflow does not natively display the number of linked items, so you can manually add a Number Field in the "Authors" collection and update it manually.
  • Add a custom embed element to your Author page.

  • Inside this embed, use JavaScript to count the number of article items and update the UI dynamically. Example:

    ```html

    ```

  • Ensure .author-item wraps the author, .article-item represents individual article elements inside it, and .article-count is used to show the count.

5. Alternative: Use Make (Integromat) or Zapier

  • Use Make (formerly Integromat) or Zapier to automatically update an "Article Count" field in the Authors collection whenever a new article is added.

Summary

Webflow does not provide an automatic article count per author, but you can achieve it with either JavaScript for real-time updates or Zapier/Make to periodically update a CMS field. The JavaScript method is more dynamic, while Zapier/Make works well if a CMS-based number field is needed.

Rate this answer

Other Webflow Questions