I'd like to ask for a new method in TwigEngine, a method that's capable of rendering a block from a template. The reason why I'm asking this:
We are developing web applications using sf2 for desktop and mobile platforms. The business logic is the same for both desktop and mobile but the UI uses different themes. Some common UI elements (e.g. notification, warning, error) has a very simple, one-line twig template, however they can be different in every theme. Also, sometimes we need to render them during an AJAX/AHAH request. We'd like to keep these simple templates in one file, otherwise we would have tons of small files for each theme. Our idea was to define blocks in a template file and have a method that renders a specific block from a template. Is this the best solution? Because then we need a renderBlock method in twig engine, something like this: + public function renderBlock($template, $block, array $parameters = array()) + { + $twigTemplate = $this->load($template); + return $twigTemplate->renderBlock($block, $parameters, $twigTemplate->getBlocks()); + } What do you think? Should I open a ticket for that? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to symfony-devs@googlegroups.com To unsubscribe from this group, send email to symfony-devs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en