Php 在Zend框架中设置视图缩进
在Zend Framework中,可以为headMeta()、headLink()等设置缩进:Php 在Zend框架中设置视图缩进,php,zend-framework,indentation,zend-layout,Php,Zend Framework,Indentation,Zend Layout,在Zend Framework中,可以为headMeta()、headLink()等设置缩进: 我喜欢这个。我喜欢整洁的东西。因此,现在我想在layout.phtml文件中缩进整个视图,使视图脚本中的每一行都缩进X个选项卡 <?= $this->layout()->setIndent("\t\t")->content ?> 这是行不通的。在Zend Framework中是否有任何方法可以做到这一点,而不必使用ob_start截取输出?Zend_布局没有se
我喜欢这个。我喜欢整洁的东西。因此,现在我想在layout.phtml文件中缩进整个视图,使视图脚本中的每一行都缩进X个选项卡
<?= $this->layout()->setIndent("\t\t")->content ?>
这是行不通的。在Zend Framework中是否有任何方法可以做到这一点,而不必使用ob_start截取输出?Zend_布局没有
setIndent()
,请检查此处:您必须自己在模板中处理缩进
一个通用的解决方案是使用。届时的选择将是:
indent => true
indent-spaces => 4
“不”当然是对我问题的回答。感谢您的帮助和使用Tidy的提示!我要试一试。
indent => true
indent-spaces => 4