Support Joomla!

references:joomla.framework:document:jdocument-parse

Table of Contents

parse

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Document Class JDocument Method parse Reference parse() Never Work in Progress

This function parses a file and create an internal patTemplate object.

Syntax

void parse ( $template, $filename, $directory )

$template string is a string containing the name of the template.
$filename string is a string containinig the filename to parse. This parameter is optional and if omitted defaults to ‘index.php’.
$directory string is a string containing the template directory. This parameter is optional and if omitted defaults to ‘templates’.

Examples

This function is called in the index.php file in the following way:

Example

global $mainframe;

$cur_template = JRequest::getVar( 'template', $mainframe->getTemplate(), 'default', 'string' );
$file     = 'index.php';

$document =& JFactory::getDocument();
$document->parse($cur_template, $file);
 
references/joomla.framework/document/jdocument-parse.txt (632 views) · Last modified: 2007/08/15 15:04