Customizing template rendering and element placing
Hello,
Is there a way of changing how, and particularly where the action buttons are rendered?
For example, I want to put my table in a bootstrap panel, and the New button in the panel footer.
I could override the templates, but any change I make would be applied to every datatable.
Instead, it would be convenient to render the different parts of the datatable_html template separately as blocks.
Something like:
<div class="panel panel-default">
{{ datatable_render_block(datatable, table) }}
<div class="panel-footer">
{{ datatable_render_block(datatable, actions) }}
</div>
</div>
Is there some way to do this in twig that I am not aware of?
Or would it require adding a renderBlock() method in the twig extension?
I tried overriding the whole DatatableTwigExtension, but with little success at the moment.
Besides, it seems a bit overkill for my needs.
I'll be rendering those actions outside de datatable for now,
without using the topActions.