0

I'm using SonataBlockBundle in my current project. I create a SimpleBlock and render it in my twig template with something like {{ sonata_block_render('name' : 'myBlock') }}. But the block consists of title and body, is there a way to render title and body separately, like I can do with form fields?

Thank you in anticipation!

enigma
  • 493
  • 2
  • 5
  • 18

1 Answers1

0

The best way to go there would be to create a custom BlockService (see http://sonata-project.org/bundles/block/master/doc/reference/your_first_block.html for instructions about that), with a custom twig template where you will be able to specify your title/body rendering.

Hugo Briand
  • 1,683
  • 20
  • 27