Thank you for your suggestion. However, I do not think that this is the job 
of the controller. This is just simple presentation logic so I think it is 
okay to be in the layout. If i do that, then the layout will will have a 
dependency on the controller no? I do not want that. 

This is easily achieved using php templates 
[pseudocode]
if this.views[slots]->has(sidebar)

show markup
show this.views[slots]->output(sidebar)
show markup

endif

It should be as easily achieved in twig if twig is to serve as a replacement 
for php templates.

{% if block sidebar %}
<div id="sidebar">
{% block sidebar %}{% endblock %}
</div>
{% endif %}

I think I may have to write an extension for twig to achieve this or use php 
templates. 
However, I've seen the power of twig templates and the advantages it offers 
over php templates. So I might just have to write that extension (I had to 
do the same when I used the .net platform with c# for a project last month).

-- 
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 [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-devs?hl=en

Reply via email to