English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm new to PHP, but I've made some ASP.NET websites. I'd like to know if you can use a master page with PHP like you can with ASP.NET - something similar to all the different files reference to one master file to show the parts of the website that stay the same.

2007-10-30 18:48:24 · 2 answers · asked by Paul R 2 in Computers & Internet Programming & Design

2 answers

i haven't seen a php master page juz like asp.net. but if you use some framework like cakePHP, then, things will change. i have use that framework in my site http://urpalate.com the header and footer their are a separate page. so if i make another page, i only make a content for it then put it in the directory corresponding to the content folder and there it is.

2007-10-30 18:55:56 · answer #1 · answered by Firefox 2 · 0 0

In PHP, there is a very similar technique called templating. Instead of a master page, you have a template. The language itself has no built-in templating features, but there are third-party templating engines (Smarty, PHPTAL, and XTemplate, to name a few).

Additionally, if you want to have "real" master pages, it is entirely possible to implement them. Just wrap you master page into a class and include() that class into your content pages...

2007-11-01 17:01:36 · answer #2 · answered by NC 7 · 2 0

fedest.com, questions and answers