{{header}}
<style>
{{custom_style}}
</style>
{% include template('partial/d_breadcrumb') %}
    {% include template('partial/d_layout_open') %}
        <div class="bm">
            <div class="bm-category-info clearfix">
                {% if edit %}<div class="btn-group btn-group-xs pull-right" ><a class="btn btn-default " href="{{edit}}" target="_blank"><i class="fa fa-pencil"></i> {{text_edit}}</a></div>{% endif %}
                <h1 class="h1 title">{{heading_title}}</h1>
                {% if (thumb and setting.category.image_display) %}
                <div class="image"><img src="{{thumb}}" alt="{{heading_title}}" title="{{heading_title}}" class="img-responsive" /></div>
                {% endif %}
                {% if description %}
                <div class="description">{{description}}</div>
                {% endif %}
            </div>

            {% if categories %}
            <div class="bm-categories">
                <div class="h3">{{text_categories}}</div>

                <div class="row auto-clear">
                    {% for category in categories %}
                    <div class="col-sm-{{category.col}} col-xs-4">
                        <a class="item-cateogry" href="{{category.href}}">
                            {% if setting.category.sub_category_image %}
                                <div class="image"><img src="{{category.thumb}}" alt="{{category.title}}" title="{{category.title}}" /></div>
                            {% endif %}
                            <div class="title">{{category.title}}</div>
                        </a>
                    </div>
                    {% endfor %}
                </div>

            </div>
            {% endif %}
            {% if posts %}
                {% include template(layout_template) with posts %}
            {% endif %}

            {% if not posts and post_display_on_main == false %}
                <p class="bm-empty">{{text_empty}}</p>
                <div class="buttons">
                    <div class="pull-right">
                            {% include template('partial/button') with {button:{
                                link:continue, 
                                style:'primary',
                                text_button: button_continue
                        }} %}
                    </div>
                </div>
            {% endif %}
        </div>
    {% include template('/partial/d_layout_close') %}
{{footer}}
