Hello Alok,
Toolset offers two editing experiences to build your views, archive templates, and content templates: The blocks editor, and the legacy editor. You can activate both or one of the experiences in Toolset->Settings->General(tab)->Editing experience.
Currently, your website is configured to have both. There are some old views in the trash that were created using the legacy editor. So, I created my example using the legacy editor. You can do the same using Blocks too.
Our current documentation and videos are focused on the blocks editing experience:
- https://toolset.com/documentation/
- hidden link
However, you can still find some legacy documentation and some Youtube videos about the legacy editor:
- https://toolset.com/documentation/user-guides/
- https://toolset.com/documentation/legacy-features/views-plugin/
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
Keep in mind that:
- Views are used to display a list of posts, terms, or users.
- Content templates are meant to display ONE post.
To achieve a hierarchy of courses, chapters, and lessons, you will need to use lists and lists inside lists. Views, inside views.
1. First view: List of chapters related to a course:
- Query filter on related posts to the post where this view is shown. Check this screenshot hidden link
- Choose the menu order to get the same order as the backend here hidden link
- Add the chapter link or title inside the loop. Check this screenshot hidden link
2. Second view: List of lessons related to a chapter: Similar to the first, except for the filter:
- Query filter on related posts to the current post in the loop. Check this screenshot hidden link
- Choose the menu order to get the same order as the backend.
- Add the lesson link inside the loop. In this view, I did not use a content template inside the view.
3. Add a WP Views widget inside the sidebar, and choose the first view. Check this screenshot hidden link
And voila: hidden link
Please note that this view will return results only for course pages. In chapter pages and lesson pages, you will get no results, check this screenshot: hidden link
You may want to customize/remove the "no results" message. Or you may want to conditionally display the view only for course pages. Let me know if you need help with it.
I hope this is clear enough to give you an idea on how to use the legacy views editor. Let me know if you have any questions.