Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Custom template when creating a Block #211

Open
robhunt3r opened this issue Oct 4, 2014 · 1 comment
Open

Custom template when creating a Block #211

robhunt3r opened this issue Oct 4, 2014 · 1 comment

Comments

@robhunt3r
Copy link

So it would be nice to can customize any block by writing a template path on Sonata Admin, for example a SimpleBlock now needs to edit CmfBlockBundle:Block:block_simple_createphp.html.twig (or without createphp) in order to customize a simple block, but it will affect every SimpleBlock which sometimes is necessary to have independent templates...

I don't know if this feature exists, to change template of a single block, but I've not found it unfortunately.

@dbu
Copy link
Member

dbu commented Oct 6, 2014

you need to dig through sonata block bundle for this a bit i think.

or just try if it happens to work when you use $block->setSetting('template', $myTemplate). probably needs a custom widget or something. and you want your templates in a dropdown, not have some content editor paste template names into a textfield...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants