themes/BootstrapChildTheme/BitBagSyliusCmsPlugin/views/Shop/Page/show.html.twig line 1

Open in your IDE?
  1. {% extends '@SyliusShop/layout.html.twig' %}
  2. {% set published = (page.publishAt is not null and page.publishAt|date("Y-m-d H:i:s") < "now"|date("Y-m-d H:i:s") or page.publishAt is null) %}
  3. {% block stylesheets %}
  4.     {{ parent() }}
  5.     {{ encore_entry_link_tags('shop-cms-page', null, 'bootstrapTheme') }}
  6. {% endblock %}
  7. {% block javascripts %}
  8.     {{ parent() }}
  9.     {{ encore_entry_script_tags('shop-cms-page', null, 'bootstrapTheme') }}
  10. {% endblock %}
  11. {% block title %}
  12.     {{ sylius_template_event('dedi_sylius_seo_plugin.title', { resource: product ?? sylius.channel, title: page.title is not empty and published == true ? page.title : null }) }}
  13. {% endblock %}
  14. {% block metatags %}
  15.     {% if published == true %}
  16.         {% if page.metaKeywords is not empty %}
  17.             <meta name="keywords" content="{{ page.metaKeywords }}"/>
  18.         {% endif %}
  19.         {% if page.metaDescription is not empty %}
  20.             <meta name="description" content="{{ page.metaDescription }}"/>
  21.         {% endif %}
  22.     {% endif %}
  23. {% endblock %}
  24. {% block breadcrumb %}
  25.     <nav aria-label="breadcrumb">
  26.         <ol class="breadcrumb">
  27.             <li class="breadcrumb-item"><a class="breadcrumb-link" href="{{ path('sylius_shop_homepage') }}">{{ 'sylius.ui.home'|trans }}</a></li>
  28.             <li class="breadcrumb-item active" aria-current="page">{{ page.breadcrumb }}</li>
  29.         </ol>
  30.     </nav>
  31. {% endblock %}
  32. {% block content %}
  33.     {% if published == true %}
  34.         <div class="page my-7">
  35.             <h1 class="bitbag-page-name">{{ page.name }}</h1>
  36.             {% if page.image %}
  37.                 <img class="page-image ui fluid image" src="{{ page.image.path }}" alt="{{ page.name }}">
  38.             {% endif %}
  39.             <div class="bitbag-page-content">{{ bitbag_cms_render_content(page) }}</div>
  40.             {#<div class="bitbag-page-sections">
  41.                 {% include '@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig' %}
  42.             </div>#}
  43.         </div>
  44.         {% if page.products|length > 0 %}
  45.             <h2>
  46.                 {{ 'bitbag_sylius_cms_plugin.ui.page_related_products'|trans }}
  47.             </h2>
  48.             <div class="bitbag-page-products">
  49.                 {% include '@SyliusShop/Product/_horizontalList.html.twig' with {'products': page.products} %}
  50.             </div>
  51.         {% endif %}
  52.     {% else %}
  53.         {% include '@BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig' with {'publishAt': page.publishAt} %}
  54.     {% endif %}
  55. {% endblock %}