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
  • Page/Block Templates
  • General usage

Was this helpful?

  1. Sylius CMS Plugin
  2. Developer Reference

Templates

Page/Block Templates

Templates allow you to define and select the layout of your pages and blocks.

General usage

By default, the blocks and pages have its own templates. You can create your own templates and use it in specific blocks or pages.

Creating a new template

  1. Go to the config/packages/cms_plugin.yaml file.

  2. Define your templates in following format:

sylius_cms:
	templates:
		pages:
			- "@SyliusCMSPlugin/Shop/MyPage/template.twig"
			- "@SyliusCMSPlugin/Shop/MySecondPage/template.twig"
		blocks:
			- "@SyliusCMSPlugin/Shop/MyPage/template.twig"
			- "@SyliusCMSPlugin/Shop/MySecondPage/template.twig
  1. Create a new template file. For example, templates/bundles/SyliusCMSPlugin/Shop/MyPage/template.twig.

  2. Go to the Block/Page form and select your template from the list.

PreviousContent Elements

Last updated 5 days ago

Was this helpful?