> For the complete documentation index, see [llms.txt](https://docs.sylius-cms.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sylius-cms.com/concepts/blocks.md).

# Blocks

The name *blocks* gives the concept away. These are the building blocks of anything else. This is what everything else is made up of.

To render a block in a template you write `{{ sscms_block('your block code') }}`.

Though simple, we have added a few things to make it shine. The interface looks like this:

![Create block interface](/files/NQ3H1O967tuKkjZwaXdh)

### Default content

As you can see we have added a default content field. Let's say you want to output **BLACK FRIDAY** in a block to all your users, no matter their language. This is the field for that. This way you don't have to copy 'BLACK FRIDAY' in all the content fields. It's also very useful when you add new languages. With the default content field these new languages will have content to show instead of nothing.

### The editor

The editor we use is the [editorjs](https://editorjs.io/). It's what's called a block-based or block-styled editor much like the Gutenberg in Wordpress. All paragraph, images, quotes etc. are made up of small pieces that are then turned into JSON and subsequently turned into HTML. If you want a new feature in the editor please reach out or if it's very specific to your business have your developer create a plugin for the editor (it's rather simple ;)).

### Content is rendered as Twig

Woohooo! If you read the [templates](/concepts/templates.md) page you know the power of Twig. Instead of just outputting the HTML generated, we generate Twig and when blocks are rendered, they are rendered in the Twig engine. This means you can for example output/use global Twig variables directly in your blocks. I.e. `{{ sylius.channel.code }}` would output the `code` for the current channel.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sylius-cms.com/concepts/blocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
