The Blogs Page: The feed/digest view script
Friday, April 16, 2010
The view script for the feed/digest action is straightforward. If there is an error, that is rendered; otherwise, the feed digest is displayed.
if (isset($this->errorMessage)) { if (APPLICATION_ENV == 'development') { printf('<p class="error">%s</p>', $this->errorMessage); } else { echo '<p><strong>Recent Posts:</strong> None found</p>' . PHP_EOL; } } else { $digest = $this->feedDigest($this->blog->feed); if (strlen($digest) > 0) { echo '<p><strong>Recent Posts:</strong></p>' . PHP_EOL; echo $digest . PHP_EOL; } else { echo '<p><strong>Recent Posts:</strong> None found</p>' . PHP_EOL; } }
The view helper used to generate the digest will be examined in the next post.

Practical Web 2.0 Applications with PHP (Expert's Voice) by Quentin Zervaas
Beginning Databases with PostreSQL: From Expert to Professional 2nd Edition: From Novice to Professional by Neil Matthew, Richard Stones