如何在php
中製作母版頁?像ASP.NET MVC中的Layout.cshtml
(和RenderBody()
)?實現母版頁功能。 PHP
謝謝!
P.S.也許有用於此目的的第三方工具?
編輯
確定。這件事不是關於MVC架構!不要看這裏:http://jsfiddle.net/challenger/8qn22/109/
I want the master page/layout to stay when user gets redirected to the other page
Want an average page to be nested inside the content division
。So if it is a form I want this form to be displayed like:
http://jsfiddle.net/challenger/XgFGb/17/
你在PHP中使用任何框架嗎? PHP沒有開箱即用的MVC,所以你需要選擇一個MVC框架,而且大多數時候它們都有自己的「佈局/模板」引擎。看看Code Igniter,Kohana,Sympfony等。 – allaire
我根本不考慮MVC模式。所有需要的是母版頁的概念。 – lexeme
那麼你比較ASP.NET是MVC,所以我想你需要某種mvc引擎... – allaire