{% comment %} Logic to traverse courses and find total number of sections {% endcomment %} {% assign total_activities = 0 %} {%- for sections in course.published_sections -%} {%- for activity in sections.activities -%} {% capture total_activities %}{{ total_activities | plus:1 }}{% endcapture %} {%- endfor -%} {%- endfor -%} {% comment %} There's no way to access a course's UID. We will obtain this by using string manipulation on the cover_path URL which has a UID. course.cover_path ~> /outline/{{id}}/cover {% endcomment %} {% assign course_path = course.cover_path | split: '/' %} {% assign current_course_id = course_path[2] %} {% comment %} Maps each course to a unique wistia video ID 7y2g0qxeau - Dropshipping 101 qo5788bbls - Print-on-demand e9hnbvbf7d - Getting Started 6g1xm0gjib - Sell online ltclfpq7nt - Instagram opg154519q - Product photography u3blun0rzz - Email Marketing a611upbzc3 - Design online store bo4mzx19u6 - SEO 7y64y9pmh4 - Basic Facebook Advertising 7o0az46tem - Google Ads ykp3huo7aw - Advanced Facebook Advertising kb70y48ybt - Goal Setting with Daymond John {% endcomment %} {% assign wistia_video_map = ' bjd91jww | 7y2g0qxeau , ozhqhnlz | qo5788bbls , la8hxhth | e9hnbvbf7d , ydidcycm | 6g1xm0gjib , uyoyzb1a | ltclfpq7nt , 0bx4ha83 | opg154519q , v9fhhpjh | u3blun0rzz , e1wjgvk5 | a611upbzc3 , srhueoa4 | bo4mzx19u6 , 8yt4tqt9 | 7y64y9pmh4 , rx4dopwc | 7o0az46tem , qk3vorxv | ykp3huo7aw , ysr17oj6 | kb70y48ybt , ' %} {% assign course_wistia_video_id = '' %} {% assign wistia_element = wistia_video_map | split: ',' %} {%- for course in wistia_element -%} {% comment %} Capture will convert the array element into an array and strip is used to remove the blank space characters for string comparison {% endcomment %} {% assign course_element = course | split: '|' %} {%- capture course_id -%} {{ course_element[0] | strip }} {%- endcapture -%} {%- if course_id == current_course_id -%} {% assign course_wistia_video_id = course_element[1] %} {%- endif -%} {%- endfor -%}
{{ course.short_description }}
Total modules
{{ course.published_sections.count }}