首页模板文件
设置在后台主题-管理-选中网校课程
然后前台调用代码
{% if code != 'course-grid-with-condition-index' %}
{% cache 'jianmo/default/' ~ code 600 %}
{% include 'default/' ~ code ~ '.html.twig' with {config:config, category: category} %}
{% endcache %}
{% else %}
{% include 'default/' ~ code ~ '.html.twig' with {config:config, category: category} %}
{% endif %}
输出course-grid-with-condition-index 名称的twig模板
appResourcesviewsdefaultcourse-grid-with-condition-index.html.twig
其中循环输出课程 加载 'course/widgets/course-grid.html.twig'
位置
appResourcesviewscoursewidgetscourse-grid.html.twig
其中涉及到的控制器是
srcAppBundleExtensionsDataTagPopularCoursesByCategoryDataTag.php