O'Reilly logo

Mastering Joomla! 1.5 Extension and Framework Development by Chuck Lanham, James Kennard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying the document

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.

Page title

The page title is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required