开发者

Symfony: Can a component skip rendering the partial?

In my view I always want to call a component, but the component sometimes doesn't have to render anything.

Is it possible in this situation to tell symfony to skip rendering the partial?

Renderin开发者_StackOverflowg an empty partial feels a bit ugly...


When the component doesn't have to render anything, just return sfView::NONE; in the component function.

You could skip using partials and use include_component instead...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜