Skip to content

Commit

Permalink
Simplify global blocks example to ref (#798)
Browse files Browse the repository at this point in the history
* Simplify global blocks example to ref

* Update book/templates.rst

---------

Co-authored-by: Prokyonn <daniel.mathis@sector8.eu>
  • Loading branch information
alexander-schranz and Prokyonn authored May 7, 2024
1 parent d513a63 commit 642db14
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions book/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ from within a block.

.. note::

Because the ``&`` character needs to be escaped inside of XML files, you have to use ``AND`` instead of ``&&``
Because the ``&`` character needs to be escaped inside of XML files, you have to use ``AND`` instead of ``&&``
if you want to connect conditions using a logical and. Additionally, you can use ``OR`` instead of ``||``.

Language Independent Properties
Expand Down Expand Up @@ -942,23 +942,15 @@ node and the ``ref`` attribute:
<block name="blocks" default-type="text_block" minOccurs="0">
<types>
<type ref="text_block" />
<type name="editor">
<meta>
<title lang="en">Editor</title>
<title lang="de">Editor</title>
</meta>
<properties>
<property name="text_editor" type="text_editor">
<meta>
<title lang="en">Text Editor</title>
<title lang="de">Texteditor</title>
</meta>
</property>
</properties>
</type>
</types>
</block>
.. note::

Mixing global and local block types is supported, but it is recommended to keep your block type names unique
to avoid confusion. This approach also simplifies the transition to global blocks in the future, eliminating the need
for data migrations.

Caching
-------

Expand Down

0 comments on commit 642db14

Please sign in to comment.