diff --git a/main/forum/index.php b/main/forum/index.php index 45e3f34434..791052f82a 100755 --- a/main/forum/index.php +++ b/main/forum/index.php @@ -532,9 +532,6 @@ if (is_array($forumCategories)) { } } $tpl = new Template($nameTools); -if(api_get_configuration_value('forum_fold_categories')==true){ - $tpl->assign('forum_fold_categories', true); -} $tpl->assign('introduction', $introduction); $tpl->assign('actions', $actions); $tpl->assign('data', $listForumCategory); diff --git a/main/template/default/forum/list.tpl b/main/template/default/forum/list.tpl index 6bc89455ee..7f6316cc29 100644 --- a/main/template/default/forum/list.tpl +++ b/main/template/default/forum/list.tpl @@ -1,8 +1,15 @@ {% extends 'layout/layout_1_col.tpl'|get_template %} {% block content %} {{ form_content }} -{% if data is not empty %} - {% if(forum_fold_categories == true) %} + {% set configuration = 'forum_fold_categories'|api_get_configuration_value %} + {% if(configuration == true) %} + {% set collapsed = '' %} + {% set in_collapse = 'in' %} + {% else %} + {% set collapsed = 'collapsed' %} + {% set in_collapse = '' %} + {% endif %} + {% if data is not empty %}
{{ 'ForumThreads'| get_lang }}: {{ subitem.number_threads }}
-