简体   繁体   English

drupal最佳性能:太多tpl?

[英]drupal best performance: too many tpls?

我正在开发一个新的drupal 7主题,我想知道是否对每个标记块/视图/区域使用模板文件,或者在template.php中使用钩子函数会更好。

There is no perfect answer. 没有完美的答案。 If you site is correctly configured, there shouldn't be much performance difference. 如果您的网站配置正确,则性能不会有太大差异。

While there may be debate on this, it really comes down to whether you are more comfortable in the theming realm, and prefer to build templates, or the coding realm, and prefer building functions in template.php. 尽管可能对此进行辩论,但这实际上取决于您是否更适应主题领域,是喜欢构建模板,还是更喜欢编码领域,并且更喜欢在template.php中构建函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM