-
Book Overview & Buying
-
Table Of Contents
Mastering Joomla! 1.5 Extension and Framework Development Second Edition
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 the most commonly modified part of the page. The title is the contents of the title tag that is located in the XHTML head tag.
There are two methods related to the title: getTitle() and setTitle(). The
getTitle() method retrieves the existing...
Change the font size
Change margin width
Change background colour