私はzendフレームワークでテンプレートシステムを実装しようとしています。Zend_Layoutを使用して複数のレイアウトを管理しますか?
私は基本的にすべての部分ファイルとテンプレートのバリエーションを1つのファイルに入れますが、テンプレートが増えているので、これは非常に扱いにくいものです。あなたはので、私はよくパーシャルを定義し、この構造の下
/application/layout/script/template1/partial/banner.phtml
/application/layout/script/template1/partial/footer.phtml
/application/layout/script/template1/variation/1.phtml
/application/layout/script/template1/variation/2.phtml
/application/layout/script/template2/partial/banner.phtml
/application/layout/script/template2/partial/footer.phtml
/application/layout/script/template2/variation/1.phtml
/application/layout/script/template2/variation/2.phtml
それを管理する方法手に負えないこれは で、見ることができる例
/application/layout/script/template1partial-banner.phtml
/application/layout/script/template1partial-footer.phtml
/application/layout/script/template1variation1.phtml
/application/layout/script/template1variation2.phtml
/application/layout/script/template2variation1.phtml
/application/layout/script/template2variation2.phtml
ため
は問題ではありません、あなただけのことができます使用する$this -> render($this -> getTemplateName()."/partials/banner.phtml");
それは主な問題であるバリエーション 私はを使用しました以前はでしたが、新しいものについては使用できません。
どうすればいいですか?