JDocumentRenderer

From Joomla! Documentation

Jump to: navigation, search

JDocumentRenderer is an abstract class which provides a number of methods and properties to assist in rendering a particular document type. Not all document types implement renderers in this way. Some of the methods listed will be overridden by the child class so you should check the child class documentation for further information.

Contents

Availability

Joomla 1.5 Joomla 1.6

Defined in

/libraries/joomla/document/renderer.php

Extends

Extended by

Document type: feed

Document type: html

Methods

Method name Description
getContentType Get MIME type of document.
render Renders the document.

Importing

Do not import this class directly; it is imported automatically by JDocument.

Adding support for new document renderers

New renderer types are added by creating a new file in the renderer directory under the document type directory with the same name as the renderer. For example, to add a document renderer type called "myrenderer" for document type "mytype", you would create the file /libraries/joomla/document/mytype/renderer/myrenderer.php. This file will contain the class definition for JDocumentRendererMytype which extends JDocumentRenderer. Look at the code for existing document renderers to see what needs to be done.

See also

Personal tools