====== parse ====== {#JAPI Joomla.Framework Document JDocument::parse #} 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: global $mainframe; $cur_template = JRequest::getVar( 'template', $mainframe->getTemplate(), 'default', 'string' ); $file = 'index.php'; $document =& JFactory::getDocument(); $document->parse($cur_template, $file);