<commit_before>Twig Helpers
============

Render a block from its instance

.. code-block:: jinja

    {{ sonata_block_render(block) }}

Render by providing the block's type and options

.. code-block:: jinja

    {{ sonata_block_render({ 'type': 'sonata.block.service.rss' }, {
        'title': 'Sonata Project\'s Feeds',
        'url': 'http://sonata-project.org/blog/archive.rss'
    }) }}

Render by providing the block's cache options

.. code-block:: jinja

    {{ sonata_block_render(block, {
        'use_cache': use_cache,
        'extra_cache_key': extra_cache_key
    }) }}

Render a block by calling an event

.. code-block:: jinja

    {{ sonata_block_render_event('node.comment', {
        'target': post
    }) }}

review the events section for more information: :doc:`events`<commit_msg>Add missing twig helper<commit_after>Twig Helpers
============

Render a block from its instance

.. code-block:: jinja

    {{ sonata_block_render(block) }}

Render by providing the block's type and options

.. code-block:: jinja

    {{ sonata_block_render({ 'type': 'sonata.block.service.rss' }, {
        'title': 'Sonata Project\'s Feeds',
        'url': 'http://sonata-project.org/blog/archive.rss'
    }) }}

Render by providing the block's cache options

.. code-block:: jinja

    {{ sonata_block_render(block, {
        'use_cache': use_cache,
        'extra_cache_key': extra_cache_key
    }) }}

Render a block by calling an event

.. code-block:: jinja

    {{ sonata_block_render_event('node.comment', {
        'target': post
    }) }}

review the events section for more information: :doc:`events`

Render related javascripts and stylesheets for the current page. The helpers call need to be at the end of the page

.. code-block:: jinja

    {{ sonata_block_include_stylesheets() }}
    {{ sonata_block_include_javascripts() }}




{'fraction_non_alphanumeric': 0.13830361966504592, 'fraction_numerical': 0.0, 'mean_word_length': 3.317016317016317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7306930', 'n_tokens_mistral': 599, 'n_tokens_neox': 567, 'n_words': 155}