Commit 22e01a8c by Douglas Hall

Merge pull request #11172 from edx/hasnain-naveed/HOL-36

HOL-36 Allow for override of course listing in index.html
parents e3664c35 7f6d2d04
<%namespace name='static' file='static_content.html'/>
<%! from django.utils.translation import ugettext as _ %>
<section class="courses-container">
<section class="highlighted-courses">
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
<section class="courses">
<ul class="courses-listing">
## limiting the course number by using HOMEPAGE_COURSE_MAX as the maximum number of courses
%for course in courses[:settings.HOMEPAGE_COURSE_MAX]:
<li class="courses-listing-item">
<%include file="course.html" args="course=course" />
</li>
%endfor
</ul>
</section>
## in case there are courses that are not shown on the homepage, a 'View all Courses' link should appear
% if settings.HOMEPAGE_COURSE_MAX and len(courses) > settings.HOMEPAGE_COURSE_MAX:
<div class="courses-more">
<a class="courses-more-cta" href="${marketing_link('COURSES')}"> ${_("View all Courses")} </a>
</div>
% endif
% endif
</section>
</section>
......@@ -61,30 +61,12 @@ from microsite_configuration import microsite
</div>
</header>
<section class="courses-container">
<section class="highlighted-courses">
<%
# allow for microsite override of the courses list
courses_list = microsite.get_template_path('courses_list.html')
%>
<%include file="${courses_list}" />
% if settings.FEATURES.get('COURSES_ARE_BROWSABLE'):
<section class="courses">
<ul class="courses-listing">
## limiting the course number by using HOMEPAGE_COURSE_MAX as the maximum number of courses
%for course in courses[:settings.HOMEPAGE_COURSE_MAX]:
<li class="courses-listing-item">
<%include file="course.html" args="course=course" />
</li>
%endfor
</ul>
</section>
## in case there are courses that are not shown on the homepage, a 'View all Courses' link should appear
% if settings.HOMEPAGE_COURSE_MAX and len(courses) > settings.HOMEPAGE_COURSE_MAX:
<div class="courses-more">
<a class="courses-more-cta" href="${marketing_link('COURSES')}" > ${_("View all Courses")} </a>
</div>
% endif
% endif
</section>
</section>
</section>
<section id="video-modal" class="modal home-page-video-modal video-modal">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment