On Tue, 8 Feb 2011 00:05:13 -0800 (PST), Frenck <[email protected]> wrote:
> Hi,
> 
> I've got an issue. In the config.yml I've defined my templating
> engine:
> 
> app.config:
>   templating:     { engines: ['php'] }
> 
> 
> I also would like to use the WebProfilerBundle... So i've added the
> profiler to my kernel:
> 
>       if ($this->isDebug())
>       {
>         $bundles[] = new Symfony\Bundle\WebProfilerBundle
> \WebProfilerBundle();
>       }
> 
> 
> Right now when I view a page, the page is loaded, but where the
> WebProfilerBar should be, I see this:
> 
> {% if 'normal' != position %}
> {% endif %}
> {% for name, template in templates %}
> {{ template.renderblock('toolbar', { 'collector':
> profiler.get(name) }) }}{% endfor %}{% if 'normal' != position %}  {%
> endif %}
> 
> 
> Seems like the webprofiler uses Twig.

Yes, the webprofiler uses Twig, as all the third-party bundles following
best practices.

> 
> I've also tried defining my templating engines like this:
> 
> app.config:
>   templating:     { engines: ['php','twig'] }
> 
> But that throws an exception: No engine is able to work with the
> "MyBundle:Dashboard:index.php.html" template.
> 
> 
> How to fix this?

The good syntax for the template name is
'MyBundle:Dashboard:index.html.php'. the renderer has to be the mast part
of the name.
The change made in PR5 was reverted because it appears to be a bad
decision.

-- 
Christophe | Stof

-- 
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 users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to