With separate CMS collections - Nesting of URL inside the related course Answered
Calling all Webflow Experts!
I’m currently battling with the CMS system in order to create a course website. The issue is relatively simple to explain:
The site has multiple courses, each course has multiple lessons. These are two separate CMS collections connected together using a multi-reference field. (E.g. YouTube Beginners Course → Lesson 1, Lesson 2, Lesson 3, etc.)
- There is a course browser page. This is made of a simple CMS collections list that displays all the courses in a grid. (e.g. YouTube Beginner Course, TikTok Beginners Course, etc.). This is at website.com/courses
- There are course pages. These are made from the Course Template page that is generated as the Courses CMS collection is created. It shows details of the course. (E.g. List of the lessons, hours to complete, price, etc.) This is at website.com/courses/course-slug
- There are lesson pages. These are made from the Lesson Template page that is generated as the Lessons CMS collection is created. It shows the material of the course. (E.g. Lesson 1 Title, Lesson 1 text, Lesson 1 images, next lesson, etc.) This is currently at website.com/lessons/lesson-slug.
Is there a way this URL can be nested inside the related course (as determined by the multi-reference field) so that it is instead website.com/courses/course-slug/lesson-slug ?
I know this falls outside of Memberstack specific questions - but I thought i'd ask anyway ♥️
Comments
2 comments
The very smart A J pointed out that I could just make a new CMS collection for each set of lessons. Then just edit the slug in each of those CMS collections to be course-slug/lesson-slug
Rather than relying on one CMS collection to hold all the lessons across all the courses, we break it up into more CMS collections.
Thank you so much for your help A J - I will try it tomorrow and let you know how it goes! ♥️
Tom Sargent, glad the workaround seems good for your use-case. Thanks a lot. You won't have to edit each slug per se, just have to set the collection url for each collection as per your requirement and it will host the lessons within them. Just make sure the course-slug does not conflict with any other existing page. So a slight variant of course name would do the trick here.
Sure, welcome 😇
Please sign in to leave a comment.