Arnold Daniels' Blog: How I PHP: The Output Handler - Continued
Continuing on from his previous post on output handling, Arnold Daniels shows how to build on the previous setup and add the ability to include dynamic data into the template.
For instance, it would be nice if the data in the left column, 'Beauty Tips', could be different for each page. There are several ways to solve this, but for know I will choose the simplest.
He takes a few steps to make adding the content simple:
Adding markers for the title and left menu to the template
Change the OutputHandler class to make it less static
use setData() to title the page
user setData() to add left column content
Use mark() and endmark() to section off a part of the template.
Republican presidential candidate Sen. John McCain has chosen Gov. Sarah Palin to be his running mate. She would be the first woman to serve on a Republican presidential ticket.
AFP - Nigerian President Umaru Yar'Adua's anti-corruption drive has claimed another scalp with news Friday of the arrest of an ex-governor who allegedly embezzled millions of dollars of state funds.
AP - The NBA officially handed over the Seattle franchise to Oklahoma City about two months ago, and three trucks arrived downtown at headquarters on Friday.