{% extends '/uniqskills/layout.html.twig' %}{% if category is defined and category is not empty and category.metaTags is not empty%} {% if category.metaTags.title is not empty %} {% set seoTitle = category.metaTags.title|raw %} {% endif %} {% if category.metaTags.description is not empty %} {% set seoDescription = category.metaTags.description|raw %} {% endif %} {% if category.metaTags.headScripts is not empty %} {% set seoHeadCode = category.metaTags.headScripts|raw %} {% endif %} {% if category.metaTags.bodyScripts is not empty %} {% set seoBodyCode = category.metaTags.bodyScripts|raw %} {% endif %}{% endif %}{% block title %} {% if seoTitle is defined %} {{ category.metaTags.title|raw }} {% else %} {{ 'uniqskills.metaTitle.courses'|trans }} {% endif %}{% endblock %}{% block meta %} {% if seoDescription is defined %} <meta name="description" content="{{ category.metaTags.description|raw }}"> {% endif %}{% endblock %}{% block customcss %} {% if seoHeadCode is defined %} {{ category.metaTags.headScripts|raw }} {% endif %}{% endblock %}{% block customjs %} {% if seoBodyCode is defined %} {{ category.metaTags.bodyScripts|raw }} {% endif %} {% if pagination|length > 0 %} {% set coursesId = [] %} {% for item in pagination %} {% set coursesId = coursesId|merge([item.id]) %} {% endfor %} <script>{{ gaDataLayerUS('prod_impression', coursesId)|raw }}</script> {% endif %}{% endblock %}{% block content %} {% if category is not null and (category.bannerName is not null or category.bannerHtml is not null) %} <div class="category-banner"> {% if category.bannerName is not null %} <a href="{{ category.bannerLink ?: '#' }}"> <img src="{{ vich_uploader_asset(category, 'bannerFile') }}" alt="{{ category.categoryName }}"> </a> {% elseif category.bannerHtml is not null %} {{ category.bannerHtml|raw }} {% endif %} </div> {% endif %} {% if app.request.locale == 'pl' %} {% set searchRoute = 'fmUniqskillsFrontendPlCatalogueSubCategory' %} {% else %} {% set searchRoute = 'fmUniqskillsFrontendCatalogueSubCategory' %} {% endif %} <div class="subpageContent"> <div class="container"> {% if app.request.server.get('DEFAULT_LOCALE') == 'pl' and "now"|date('Y-m-d') >= '2023-11-16'|date('Y-m-d') and "now"|date('Y-m-d') <= '2023-11-28'|date('Y-m-d') %} <img class="img-fluid subpageContent--courses-banner"> {% endif %} <div class="headerWithSearch"> <h1>{{ 'uniqskills.catalog.title'|trans }}</h1> <div class="headerWithSearch-search"> <form id="searchAjax" class="catalog-ajax-search" method="GET" action="{{ path(searchRoute, { category: app.request.attributes.get('category'), subCategory: app.request.attributes.get('subCategory') }) }}"> <input name="search" value="{{ app.request.get('search') }}" type="text" class="fm-search-bar fm-search-button" placeholder="{{ 'uniqskills.catalog.search'|trans }}" /> <input type="submit" class="fmFilter" value="" /> </form> </div> </div> {% include '/uniqskills/catalogue/course_catalogue_ajax.html.twig' %} </div> </div> {% if ( (category.shortBody is defined and category.shortBody is not null) and (category.body is defined and category.body is not null) ) %} <div class="categoryInfo"> <div class="container"> <h4 class="categoryInfo__header">{{ category.shortBody }}</h4> <div class="categoryInfo__text-container"> {{ category.body|raw }} </div> </div> </div> {% endif %}{% endblock %}{# TODO: Check commented code #}{#{% block customjs %}#} {#{% javascripts#} {#'backend/global/scripts/app.min.js'#} {#'@FmBaseBundle/Resources/public/js/base.js'#} {#'@FmCourseBundle/Resources/public/js/courseCatalogue.js'#} {#%}#} {#<script src="{{ asset_url }}"></script>#} {#{% endjavascripts %}#}{#{% endblock %}#}