templates/business/front/expertise.html.twig line 1

  1. {% extends 'foundation/front/front.html.twig' %}
    {% block body_class %}expertises{% endblock %}
    
    {% block metaTitle %}
        {% if sectionPageExpertise and sectionPageExpertise.i18ns is defined and sectionPageExpertise.i18ns|length > 0 %}
            {% set localeCode = sectionPageExpertise.i18ns[0].locale|split('_')|first %}
            {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? sectionPageExpertise.i18ns[0] : (sectionPageExpertise.i18ns[1] is defined ? sectionPageExpertise.i18ns[1] : null) %}
            {% if i18n %}
                <title> MK WBC | {{ i18n.name }}</title>
            {% endif %}
        {% endif %}
    {% endblock %}
    
    {% block metaHeader %}
        <meta property="og:title" content="{{ 'meta.expertise.title'|trans }}">
        <meta property="og:description" content="{{ 'meta.expertise.description'|trans }}">
        <meta property="og:url" content="{{ app.request.uri }}">
    {% endblock %}
    
    {% block front %}
        <main class="m_site-main m_site-main-expertise m_position-relative">
            <div class="m_breadcumbs">
                <div class="m_container-lg">
                    <ul class="m_nav-breadcrumb">
                        <li>
                            <a href="{{ path('app_home') }}"><i class="fa fa-home"></i></a>
                        </li>
                        <li>
                            <span>Expertise</span>
                        </li>
                    </ul>
                </div>
            </div>
            <section class="m_section-banner m_section-page">
                <div class="m_section-banner-container m_position-relative">
                    {% if sectionPageExpertise is defined and sectionPageExpertise.thumbnail is defined and sectionPageExpertise.thumbnail.filename is defined %}
                        <div class="m_banner-bg"
                             style="background-image: url('{{ path('proxy_avatar', {'path': sectionPageExpertise.thumbnail.filename}) }}');"></div>
                    {% else %}
                        <div class="m_banner-bg"
                             style="background-image: url('{{ asset('images/banner_acc.png') }}');">
                        </div>
                    {% endif %}
                    <div class="m_container-lg m_position-relative">
                        <div class="m_section-banner-desc">
                            {% if sectionPageExpertise is defined and sectionPageExpertise.i18ns is defined and sectionPageExpertise.i18ns|length > 0 %}
                                {% set localeCode = sectionPageExpertise.i18ns[0].locale|split('_')|first %}
                                {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? sectionPageExpertise.i18ns[0] : (sectionPageExpertise.i18ns[1] is defined ? sectionPageExpertise.i18ns[1] : null) %}
                                {% if i18n %}
                                    {% set expertie = i18n.name %}
                                    <h1>{{ i18n.name }}</h1>
                                    <p>{{ i18n.description|raw }}</p>
                                {% endif %}
                            {% endif %}
                        </div>
                    </div>
                </div>
            </section>
            <section class="m_section-page m_section-page-expertise">
                <div class="m_container-lg">
                    <div class="m_section-page-content">
                        <div class="m_section-page-text">
                            {% set filteredItem = items|filter(item => item.position == 1) %}
    
                            <div class="m_flex m_aligns-center">
                                {% if filteredItem is not empty %}
                                    {% set item = filteredItem|first %}
                                    <div class="m_col-half">
                                    {% set localeCode = item.i18ns[0].locale|split('_')|first %}
                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? item.i18ns[0] : (item.i18ns[1] is defined ? item.i18ns[1] : null) %}
                                    {% if i18n %}
                                        <div class="m_resume-text">
                                            <h2>{{ i18n.name }}</h2>
                                        </div>
                                        <p><br/>{{ i18n.description|raw }}</p>
                                        </div>
                                    {% endif %}
                                    <div class="m_col-half">
                                        <div class="m_box-grey">
                                            <div class="m_box-grey-content">
                                                <ul>
                                                    {% set sortedExpertiseItems = item.expertiseItems|sort((a, b) => a.position <=> b.position) %}
                                                    {% for domain in sortedExpertiseItems %}
                                                        {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                        {% set i18n = ( app.request.locale ==localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                        {% if i18n %}
                                                            <li>
                                                                {% if domain.isLink == true %}
                                                                    <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                        {{ i18n.name }}
                                                                    </a>
                                                                {% else %}
                                                                    <span class="expertise-link">{{ i18n.name }}</span>
                                                                {% endif %}
                                                            </li>
                                                        {% endif %}
                                                    {% endfor %}
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                {% endif %}
                            </div>
    
                        </div>
                        <div class="m_section-page-text">
                            {% set filteredItemList = items|filter(item => item.position == 2) %}
                            {% if filteredItemList is not empty %}
                                {% set entity = filteredItemList|first %}
                                {% set localeCode = entity.i18ns[0].locale|split('_')|first %}
                                <div class="m_section-page-title m_text-center">
                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? entity.i18ns[0] : (entity.i18ns[1] is defined ? entity.i18ns[1] : null) %}
                                    {% if i18n %}
                                        <h2>{{ i18n.name }}</h2>
                                        <p>{{ i18n.description|raw }}
                                        </p>
                                    {% endif %}
                                </div>
                                <div class="m_box-grey">
                                    <div class="m_box-grey-content">
                                        <div class="m_flex m_flex-list">
                                            <ul>
                                                {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position)|slice(0, 6) %}
                                                    {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                    {% if i18n %}
                                                        <li>
                                                            {% if domain.isLink == true %}
                                                                <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                    {{ i18n.name }}
                                                                </a>
                                                            {% else %}
                                                                <span class="expertise-link">{{ i18n.name }}</span>
                                                            {% endif %}
                                                        </li>
                                                    {% endif %}
                                                {% endfor %}
                                            </ul>
    
                                            <ul>
                                                {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position)|slice(6) %}
                                                    {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                    {% if i18n %}
                                                        <li>
                                                            {% if domain.isLink == true %}
                                                                <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                    {{ i18n.name }}
                                                                </a>
                                                            {% else %}
                                                                <span class="expertise-link">{{ i18n.name }}</span>
                                                            {% endif %}
                                                        </li>
                                                    {% endif %}
                                                {% endfor %}
                                            </ul>
    
                                        </div>
                                    </div>
                                </div>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </section>
            {{ render(controller("App\\Controller\\Foundation\\Front\\AccomplishmentSectionPageController::section")) }}
            <section class="m_section-page m_section-page-expertise">
                <div class="m_container-lg">
                    <div class="m_section-page-content">
                        <div class="m_section-page-text">
                            {% set filters = items|filter(item => item.position == 3) %}
                            <div class="m_flex m_aligns-center">
                                {% if filters is not empty %}
                                    {% set entity = filters|first %}
                                    <div class="m_col-half">
                                        {% set localeCode = entity.i18ns[0].locale|split('_')|first %}
                                        {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? entity.i18ns[0] : (entity.i18ns[1] is defined ? entity.i18ns[1] : null) %}
                                        {% if i18n %}
                                            <div class="m_resume-text">
                                                <h2>{{ i18n.name }}</h2>
                                            </div>
                                            <p>{{ i18n.description|raw }}
                                            </p>
                                        {% endif %}
                                    </div>
                                    <div class="m_col-half">
                                        <div class="m_box-grey">
                                            <div class="m_box-grey-content">
                                                <ul>
                                                    {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position) %}
                                                        {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                        {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                        {% if i18n %}
                                                            <li>
                                                                {% if domain.isLink == true %}
                                                                    <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                        {{ i18n.name }}
                                                                    </a>
                                                                {% else %}
                                                                    <span class="expertise-link">{{ i18n.name }}</span>
                                                                {% endif %}
                                                            </li>                                                    {% endif %}
                                                    {% endfor %}
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                {% endif %}
                            </div>
    
                        </div>
                        <div class="m_section-page-text">
                            {% set filterEntities = items|filter(item => item.position == 4) %}
                            {% if filterEntities is not empty %}
                                {% set entity = filterEntities|first %}
                                {% set localeCode = entity.i18ns[0].locale|split('_')|first %}
                                <div class="m_section-page-title m_text-center">
                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? entity.i18ns[0] : (entity.i18ns[1] is defined ? entity.i18ns[1] : null) %}
                                    {% if i18n %}
                                    <h2>{{ i18n.name }}</h2>
                                    <p>{{ i18n.description|raw }}
                                        {% endif %}
                                </div>
                                <div class="m_box-grey">
                                    <div class="m_box-grey-content">
                                        <div class="m_flex m_flex-list">
                                            <ul>
                                                {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position)|slice(0,3) %}
                                                    {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                    {% if i18n %}
                                                        <li>
                                                            {% if domain.isLink == true %}
                                                                <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                    {{ i18n.name }}
                                                                </a>
                                                            {% else %}
                                                                <span class="expertise-link">{{ i18n.name }}</span>
                                                            {% endif %}
                                                        </li>                                                {% endif %}
                                                {% endfor %}
                                            </ul>
                                            <ul>
                                                {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position)|slice(3) %}
                                                    {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                    {% if i18n %}
                                                        <li>
                                                            {% if domain.isLink == true %}
                                                                <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                    {{ i18n.name }}
                                                                </a>
                                                            {% else %}
                                                                <span class="expertise-link">{{ i18n.name }}</span>
                                                            {% endif %}
                                                        </li>                                                {% endif %}
                                                {% endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            {% endif %}
                        </div>
    
                        <div class="m_section-page-text">
                            {% set filterDomains = items|filter(item => item.position == 5) %}
                            {% if filterDomains is not empty %}
                                {% set entity = filterDomains|first %}
                                <div class="m_section-page-title m_text-center">
                                    {% set localeCode = entity.i18ns[0].locale|split('_')|first %}
                                    {% set i18n = ( app.request.locale ==  localeCode  and localeCode is defined) ? entity.i18ns[0] : (entity.i18ns[1] is defined ? entity.i18ns[1] : null) %}
                                    {% if i18n %}
                                        <h2>{{ i18n.name }}</h2>
                                        <p>{{ i18n.description|raw }}</p>
                                    {% endif %}
                                </div>
                                <div class="m_box-grey">
                                    <div class="m_box-grey-content">
                                        <div class="m_flex m_flex-list">
                                            <ul>
                                                {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position)|slice(0,3) %}
                                                    {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                    {% if i18n %}
                                                        <li>
                                                            {% if domain.isLink == true %}
                                                                <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                    {{ i18n.name }}
                                                                </a>
                                                            {% else %}
                                                                <span class="expertise-link">{{ i18n.name }}</span>
                                                            {% endif %}
                                                        </li>                                                {% endif %}
                                                {% endfor %}
                                            </ul>
                                            <ul>
                                                {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position)|slice(3) %}
                                                    {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                    {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                    {% if i18n %}
                                                        <li>
                                                            {% if domain.isLink == true %}
                                                                <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                    {{ i18n.name }}
                                                                </a>
                                                            {% else %}
                                                                <span class="expertise-link">{{ i18n.name }}</span>
                                                            {% endif %}
                                                        </li>                                                {% endif %}
                                                {% endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            {% endif %}
                        </div>
    
                        <div class="m_section-page-text">
                            {% set filters = items|filter(item => item.position > 5) %} {# Filter for position > 5 #}
    
                            {% if filterDomains is not empty %}
                                {% for entity in filters %} {# Loop through the filtered items #}
                                    <div class="m_section-page-title m_text-center">
                                        {% set localeCode = entity.i18ns[0].locale|split('_')|first %}
                                        {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? entity.i18ns[0] : (entity.i18ns[1] is defined ? entity.i18ns[1] : null) %}
                                        {% if i18n %}
                                            <h2>{{ i18n.name }}</h2>
                                            <p>{{ i18n.description|raw }}</p>
                                        {% endif %}
                                    </div>
                                    <div class="m_box-grey">
                                        <div class="m_box-grey-content">
                                            <div class="m_flex m_flex-list">
                                                <ul>
                                                    {% for domain in entity.expertiseItems|sort((a, b) => a.position <=> b.position) %} {# Loop through ALL expertiseItems #}
                                                        {% set localeCode = domain.i18ns[0].locale|split('_')|first %}
                                                        {% set i18n = ( app.request.locale == localeCode and localeCode is defined) ? domain.i18ns[0] : (domain.i18ns[1] is defined ? domain.i18ns[1] : null) %}
                                                        {% if i18n %}
                                                            <li>
                                                                {% if domain.isLink == true %}
                                                                    <a href="{{ path('app_expertises_detail', {'id': domain.id, 'slug': i18n.slug }) }}" class="expertise-link">
                                                                        {{ i18n.name }}
                                                                    </a>
                                                                {% else %}
                                                                    <span class="expertise-link">{{ i18n.name }}</span>
                                                                {% endif %}
                                                            </li>                                                    {% endif %}
                                                    {% endfor %}
                                                </ul>
                                                {# No need for a second <ul>; display all in one #}
                                            </div>
                                        </div>
                                    </div>
                                {% endfor %} {# End loop for filterDomains #}
                            {% endif %}
                        </div>
                    </div>
                </div>
            </section>
    
        </main>
    
    {% endblock %}