Subpages under cms collections

Hi,

I’ve a question about the use of cms collections.

For example: If you create a collection with the name of Europe and the items The Netherlands, Germany and United Kingdom (you will get the following slug: domain.com/europe/country). What is the best way to create under this cms items subpages like Amsterdam, Berlin and London (you will get the following slug: domain.com/europe/country/city).

Is it actually possible to create cms items under other cms items or do I need to use an alternative method for this?

Thanks in advance : )

1 Like

It would be more logical to have a collection called “countries” and another one called “continents”, and to reference the continents in each country with a reference field. So you’ll freely enter countries and for each, chose chat continent is it from. This way, all your countries are siblings items, not spread accross multiple collections. Then you’ll have a collection called cities where you reference the countries table.

With this structure you can do whatever you want after.

1 Like

Alright, thanks for the anwer.

Will the slug also be fine when you use references in collections. In the example above, like: domain.com/continent/country/city?

Thanks in advance : )

I don’t think so. The slug for dynamic items will always only reference their collection. So you’ll get:

domain/country/france
domain/continent/europe
domain/city/paris

and that’s as far as you can go. For now, there is no deeper control of the dynamic URLs with Webflow. I know that other CMS, like Wordpress, offer extensive options on how to show your CMS nodes (items), but Webflow don’t offer that yet. It will probably come one day.

2 Likes

Has this answer changed in the last 3 years?

Thanks!

No, it has not changed.

1 Like