Re: Calling text files -- HTML content management?

From: Date: Wed, 18 Oct 2000 02:08:17 +0000
Subject: Re: Calling text files -- HTML content management?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20769@lists.php.net to get a copy of this message
Hey Shashank: > basically read data from the database and each product from the catalog > looks EXACTLY the same on the website..."image on top left, name in bold, > description below it.." and so on. > > What if the content editors needed the flexibility to create a different > layout with each page that they create..in this case the vanilla > database-backed catalog goes out the window. > > One way to handle this is in the way I mentioned above: have them save their > HTML files etc, then just INCLUDE or REQUIRE these files and just strip all > the HTML, HEAD, TITLE, STYLE and BODY tags.. > > Is there a better way to do this? Your description of the problem is right on. Your solution seems close too. Why strip any tags though? Just write a PHP script that decides what file to show then goes ahead and include()s that file and exits. Another option is to have a PHP scrpit that includes a predefined header, navigation bar, footer, etc, then plops the item's content page in the middle using include(). This approach would have the item content pages stored not as full HTML, excluding head, foot etc. Are you thinking about having fully designed HTML pages for each item because that way designers can use whatever HTML editor they want? If this is the case, consider having a PHP/database driven search tools, but have the search results lead to a static page. The route to go depends on what your goals and design methods are. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#20769) next »