Reply to Re: CMS Design

Your name:

Reply:


Posted by C. on 01/12/07 10:53

Sharon O. wrote:
> I'm currently using my own method to make a CMS work as follows:
>
> User wants to open /pages/foo.php.
>
>
> Content of foo.php:
> <? include (".../includes/cms.php"); ?>
>

(three dots?)

> Content of cms.php::
> <title>...<body>...pretty pictures...
> <? if ($url = /pages/foo.php) { include (".../pages/foo.inc.php"); ?>
> </body>
>
> foo.inc.php then contains the actual content:
> <h2>About us</h2><p>We are...
>

Using two seperate files to describe the page contents is something of
an overhead.

One solution would be to use a front controller for the code within
cms.php, but personally, I'm not a fan of this pattern.

I'd go with implementing cms.php within a template or alternately using
a calback from cms.php to foo.php to render the page specific elements.

C.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация