Webflow sync, pageviews & more.
NEW

How can I make my CMS Сollections in Webflow open a popup to view details instead of loading a separate page? I have been unable to find a solution.

TL;DR
  • Build a Collection List with a “View Details” button for each CMS item and design a hidden static modal elsewhere on the page.
  • Use custom data attributes to pass CMS content and add JavaScript to detect button clicks, populate the modal, and display it.

To open CMS Collection item details in a popup (modal) instead of navigating to a new page in Webflow, you’ll need to dynamically load content into a modal using only native Webflow features or minimal custom code.

1. Create the CMS Collection List

  • Add a Collection List to your page and bind it to your CMS Collection.
  • Inside each Collection Item, include elements like thumbnail, title, summary, etc.
  • Add a button or link (e.g., “View Details”) that will trigger the modal.

2. Design the Modal Structure

  • Outside the Collection List, create a modal component with:
  • A div block for the modal container (use fixed positioning and give it a high z-index).
  • A close button.
  • Inside the modal, add text/image elements that will later show the clicked item’s content.
  • Set this modal to be hidden by default (display: none).

3. Use Component IDs or Attributes for Targeting

  • In the Collection List, assign custom attributes to each “View Details” button like:
  • data-title, data-image, data-summary — populated dynamically from the CMS fields.
  • Example: Use Webflow’s custom attributes in the settings panel of the button:
  • data-title = cms_field_title
  • data-body = cms_field_body

4. Add JavaScript to Fill and Open Modal

  • Add a small script in the page’s before custom code section in Page Settings:
  • The script should:
    • Listen for click events on the “View Details” buttons.
    • Read their data-attributes.
    • Inject the content into the modal’s elements.
    • Set the modal’s display to flex or block.
    • Handle the Close button.

(Note: Webflow doesn’t allow dynamic content binding into a modal this way by default—you need JS for this. CMS content isn’t dynamically injected into a modal via Designer.)

5. Prevent Modal Content from Indexing by Search Engines (Optional)

  • Add aria-hidden="true" or use display: none on load to make sure the modal content isn’t indexed or interferes with accessibility until opened.

6. Preview and Test Responsiveness

  • Ensure the modal works correctly on all breakpoints.
  • Make sure keyboard focus, scroll lock, and animation (like fade-in) are applied for better UX.

Summary

You can show CMS item details in a popup instead of a new page by using:

  • Custom attributes to pass CMS data to a modal,
  • A static modal structure outside the Collection List,
  • And JavaScript to dynamically populate and show the modal on click.

This setup preserves a single-page structure while still presenting rich CMS content interactively.

Rate this answer

Other Webflow Questions