noiselabs / SmartyBundle

Smarty3 template engine bundle for Symfony
http://smartybundle.readthedocs.io/
GNU Lesser General Public License v3.0
51 stars 36 forks source link

Web Debug Toolbar integration? #3

Closed rodneyrehm closed 12 years ago

rodneyrehm commented 12 years ago

Any chance to integrate Smarty stuff into the Web Debug Toolbar? http://www.symfony-project.org/book/1_0/16-Application-Management-Tools#chapter_16_sub_web_debug_toolbar

vitorbrandao commented 12 years ago

Hi @rodneyrehm. Let me see what I can do about it.

vitorbrandao commented 12 years ago

In the meantime the Web Debug Toolbar documentation for version 2 of Symfony is available here: http://symfony.com/doc/2.0/book/internals.html#profiler

vitorbrandao commented 12 years ago

The toolbar heavily relies on Twig templates so it requires the TwigEngine to be enabled.

In config.yml add both smarty and twig engines:

templating:      { engines: ['smarty', 'twig'] }

To completely remove twig I'll need to reimplement the whole bundle because the templates are hardcoded. This is possible of course but I would like to focus effort on other issues.

You want to see Smarty info in the toolbar or the toolbar implemented using Smarty templates?

stof commented 12 years ago

btw, note that the link given in the ticket is related to symfony1, not to Symfony2

rodneyrehm commented 12 years ago

I just saw someone talking about how great that toolbar is for development. I've never used Symfony. I was just wondering if it can be integrated or not.

vitorbrandao commented 12 years ago

Yes, it is possible. As @stof pointed out in another conversation it just a matter of building a Data Collector and a twig block. It should be possible then to add a Smarty section like in this picture.

I guess it would be ok to display information provided by the Smarty debug template or anything else you have in your mind.

vitorbrandao commented 12 years ago

@rodneyrehm I'm closing this issue. If you find something useful to show in the toolbar/debug page then feel free to re-open it and I'll work on that.