More Than Cat Diaries: Publishing With Weblogs

Feed2JS includes
Graphic by Alan Levine
Two Levels of PHP Includes

Notes: Case Study 1: Feed2JS and Includes

One part of the power of PHP as a web construction technology is te ability to generate entire sites from templates:

  • The entire Feed2JS site is powered by a single PHP file, index.php. When a page is requested, for example, clicking the download tab, it is typically passed a parameter via the URL such as .../index.php?s=download. The main template then uses whatever content is inside an external text file named download to dynamically display the web page as viewed.
  • For the main page the content is stored in a file named about, which itself has its own include of a second file, This is the actual content that is published by MovableType.
  • This multilevel template then allows MovableType to publish just the content on the bottom fo the page (three most recent updates) as a file that is part of the entire content presented for url
  • In a similar fashion, the url for the entire update history uses a blog published file that is included in the history content file.


Post a Comment

<< Home