开发者

What's the best way to pass a variable to layout.php in Symfony?

All pages of the website I'm working on will show a signin form.

I'd like to display this form in layout.php so it appears everywhere.

I'm not sure what's the best way to do this.

Should I use a filter?

I don't think using a slot is efficient since content w开发者_如何转开发on't change throughout the site.


A filter doesnt actually make much sense - in fact weve jsut gotten rid of a similar filters for things in the head have we not?? :-)

A slot is the reccommended way to pass things up to layout.php. However you could just use a partial and/or component directly in the layout with include_partial or include_component respectively.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜