E-learning

Turn your website into an e-learning video platform

Back to E-learning Support

k.pisarczyk56575
k.pisarczyk56575

In the courseDetalis, the LessonList can filter lessons by course (from created courses or by property value). I tried to set it to filter lessons automaticaly (by property value), but it always shows all lessons (from all courses) in every course page. What value should I use?

I will appreciate your help.

inIT
inIT

Hi,

Thanks for contacting us.

The courseDetails component is actually embedding the course variable to the page and as a public attribute of itself. The course variable is eagerly loaded with its lessons. So to get lessons from the course you can use course.lessons in your twig.

On the other hand, if you want to use the lessonList component, you will be able to use the courseFilter property but remember that it uses the id attribute of the course and not its slug.

It's the most efficient solution so try to use the current mechanism. Otherwise, let me know if you can't see any way to solve your issue and I will add the task to our TODO so we will add the feature in the next version.

Best regards,

Tomasz Strojny

k.pisarczyk56575
k.pisarczyk56575

Thank You very much. That worked just great :)

1-3 of 3