| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Document |
JDocument |
parse |
parse() |
Never | Work in Progress |
This function parses a file and create an internal patTemplate object.
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’. |
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);