eduSOHO 首页模板 全部课程模块代码

首页模板文件

设置在后台主题-管理-选中网校课程

然后前台调用代码

 {% 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模板

\app\Resources\views\default\course-grid-with-condition-index.html.twig

其中循环输出课程 加载   'course/widgets/course-grid.html.twig'

位置

app\Resources\views\course\widgets\course-grid.html.twig

其中涉及到的控制器是

\src\AppBundle\Extensions\DataTag\PopularCoursesByCategoryDataTag.php

 

posted @ 2017-06-28 14:55  王先生架构  阅读(432)  评论(0编辑  收藏  举报
失独者之家