The document, as described in Chapter 2, Getting Started, is a buffer used to store the content of the document that will be returned when a request is complete. There are a number of different things that we can modify in the document that will customize the resultant page.
Whenever we want to modify the document, we use the
JFactory class to obtain a reference to the global document object. This example demonstrates how:
$document =& JFactory::getDocument();
Notice that we use the
=& assignment operator to obtain a reference. If we do not, any modification we make to the document will not be applied.
All of the following examples in this section assume that
$document is the global document object.
The page title is ...