@@ -525,20 +525,23 @@ might be a CMF bundle at some point for this).
525
525
{# template.twig.html #}
526
526
{{ page.content|cmf_embed_blocks }}
527
527
528
- When you apply the filter, your users can use this tag to embed a block in
529
- their HTML content:
528
+ Make sure to only place this filter where you display the content and not where
529
+ editing it, as otherwise your users would start to edit the rendered output of
530
+ their blocks. When you apply the filter, your users can use this tag to embed a
531
+ block in their HTML content:
530
532
531
533
.. code-block :: html
532
534
533
535
<span >%embed-block:"/absolute/path/to/block"%</span >
534
536
535
537
<span >%embed-block:"local-block"%</span >
536
538
537
- The path to the block is either absolute or relative to the current main content.
538
- The actual path to the block must be enclosed with double quotes ``" ``. But the
539
- prefix and postfix are configurable. The default prefix is ``<span>%embed-block: ``
540
- and the default postfix is ``%</span> ``. Say you want to write
541
- ``%%%block:"/absolute/path"%%% `` and no ``<span> `` tag then you do:
539
+ The path to the block is either absolute or relative to the current main
540
+ content. The actual path to the block must be enclosed with double quotes
541
+ ``" ``. But the prefix and postfix are configurable. The default prefix is
542
+ ``<span>%embed-block: `` and the default postfix is ``%</span> ``. Say you want
543
+ to use ``%%%block:"/absolute/path"%%% `` and no ``<span> `` tag to avoid
544
+ problems with a wysiwyg editor, then you do:
542
545
543
546
.. configuration-block ::
544
547
@@ -553,11 +556,17 @@ and the default postfix is ``%</span>``. Say you want to write
553
556
554
557
.. caution ::
555
558
556
- Currently there is no limitation built into this feature. Only enable it
557
- on content for which you are sure only trusted users may edit it.
559
+ Currently there is no security built into this feature. Only enable the
560
+ filter for content for which you are sure only trusted users may edit it.
558
561
Restrictions about what block can be where that are built into an admin
559
562
interface are not respected here.
560
563
564
+ .. note ::
565
+
566
+ The block embed filter ignores all errors that might occur when rendering a
567
+ block and returns an empty string for each failed block instead. The errors
568
+ are logged at level WARNING.
569
+
561
570
Next Steps
562
571
----------
563
572
0 commit comments