SyliusCon 2025
Early Bird Deal
LogoLogo
🛣️ Roadmap💻 Sylius Demo💬 Community Slack
  • Sylius Documentation
  • Sylius Plugins
  • Sylius Stack
  • Sylius CMS Plugin
    • Installation
    • Features Overview
      • Collections
      • Content Templates
      • Pages
      • Blocks
      • Media
    • Developer Reference
      • Collections
      • Pages
      • Blocks
      • Media
      • Content Elements
      • Templates
Powered by GitBook
LogoLogo

Developer

  • Community
  • Online Course

About

  • Team

© 2025 Sylius. All Rights Reserved

On this page
  • Design with Twig Hooks
  • Design directly in Twig Template
  • Render the page link
  • Render only the bare URL
  • Render the entire page embedded

Was this helpful?

  1. Sylius CMS Plugin
  2. Developer Reference

Pages

Design with Twig Hooks

Use the sylius_cms.shop:render:page_link component and pass the following props:

  • code (string, required) The unique identifier of the collection you want to render.

sylius_twig_hooks:
    hooks:
        'sylius_shop.product.show.content.info.overview.accordion.details':
            dynamic_details:
                component: 'sylius_cms.shop:render:page_link'
                props:
                    code: 'my_page_code'
                    

You can use the template option, but you’ll be fully responsible for rendering the page:

# ...
code: 'my_page_code'
template: 'my_custom_page.html.twig'

Design directly in Twig Template

Render the page link

{{ sylius_cms_render_page_link('my_page_code') }}

You can override the name by passing the appropriate option:

{{ sylius_cms_render_page_link('my_page_code', {name: 'Custom URL visible name'}) }}

Render only the bare URL

{{ sylius_cms_get_page_url('my_page_code') }}

Render the entire page embedded

You can render the entire page at a low level by using the generic route and passing the page slug as a parameter:

{{ render(path('sylius_cms_shop_page_show', {'slug' : 'some-page-slug'}))}}
PreviousCollectionsNextBlocks

Last updated 5 days ago

Was this helpful?