Pages represent a customizable web page, you can adjust to your needs in admin panel.
Once you created a page in the admin panel, you can render page in two ways:
By rendering a page link template:
{{ render(path('bitbag_sylius_cms_plugin_shop_page_show_link_by_code', {'code' : 'about', 'template' : '@BitBagSyliusCmsPlugin/Shop/Page/Show/_link.html.twig'})) }}
Or rendering a page link directly:
{{ render(path('bitbag_sylius_cms_plugin_shop_page_show', {'slug' : 'about'})) }}
Let's assume you associated pages to specific products. You can render them grouped by section in your product view by using
{{ bitbag_cms_render_product_pages(product) }}
Twig function. This is where nameWhenLinked
and descriptionWhenLinked
fields are used. If you associate pages to
specific sections, they will be displayed in columns titled with section name.
If you don't know how to override templates yet, read Sylius template customization guide.
You can create a template under app/Resources/BitBagSyliusCmsPlugin/views/Shop/Page
location.
Available templates you can override can be found under this location.