To show breadcrumb navigation that reflects folder hierarchy (not just immediate parent pages) on your Webflow site, it requires a manual or CMS-based structure since Webflow doesn’t auto-generate breadcrumbs based on folder nesting.
1. Understand Webflow Folder Structure Limitations
- Webflow folders are used for URL path structuring (e.g.,
/blog/category/article
) and SEO clean-up but do not automatically define parent-child relationships. - Pages “inside” folders are not automatically recognized by Webflow as children of the folder page in terms of navigation structure.
2. Option A: Manually Build Static Breadcrumbs for Non-CMS Pages
- On each static page, manually create a breadcrumb nav using text links.
- Example:
Home > Blog > Category > Article
. - Add links using Text Links in a div block and style as desired.
- This method is time-consuming and prone to errors if URLs or hierarchy change.
3. Option B: Use CMS and Reference Fields for Dynamic Hierarchy
If you're using CMS items (like blog posts or product pages), use reference or multi-reference fields to create true parent hierarchy:
- Add a Collection for Categories or Parent Types (e.g., Blog Categories).
- For each item (e.g., Blog Post), add a Reference Field to link to its category.
- In the CMS Template page, add a breadcrumb section in this order:
- A static link to Home.
- A Link Block that pulls from the referenced Category (e.g., Blog > Category).
- The current CMS item’s title, displayed as unlinked text.
4. Option C: Use Custom Code with JavaScript for Folder Detection
- If you want to automatically build breadcrumbs based on the folder structure in the URL, you can:
- Add custom JavaScript that parses
window.location.pathname
. - Split the pathname by
/
, convert folder names to readable names, and then create DOM elements for breadcrumb links. - This approach requires manual mapping of folder names to titles (e.g.,
/blog
→ "Blog").
Example logic in plain terms:
window.location.pathname
= /blog/category/article
- Split into
["blog", "category", "article"]
- Map each segment to a page (or use readable formatting like capitalizing)
- Use DOM manipulation to build and insert the breadcrumb trail
5. Best Practice: SEO & Accessibility for Breadcrumbs
- Mark up your breadcrumbs with ARIA labels or schema.org structured data if using custom code for SEO benefits.
- Use an ordered list (
<ol>
) and ensure links are accessible by screen readers.
Summary
Since Webflow doesn't automatically generate breadcrumbs based on folders, you’ll need to build them manually, use CMS-based references, or use custom JavaScript to dynamically generate breadcrumbs from URL paths. CMS-based methods offer the most scalable approach for content-rich sites.