Re: How Do I Parse Single Tpl File
Honestly I don't see the reason why you may want to parse a single file, since single file parsing doesn't output anything, unless you then run specific functions.
Anyway, I'll try to answer your question.
From
functions.php
:
function full_page_generation($page_template, $page_title = '', $page_description = '', $page_keywords = '')
{
global $template, $meta_content;
$meta_content['page_title'] = (!empty($page_title) ? $page_title : (!empty($meta_content['page_title']) ? $meta_content['page_title'] : ''));
$meta_content['description'] = (!empty($page_description) ? $page_description : (!empty($meta_content['description']) ? $meta_content['description'] : ''));
$meta_content['keywords'] = (!empty($page_keywords) ? $page_keywords : (!empty($meta_content['keywords']) ? $meta_content['keywords'] : ''));
page_header();
$template->set_filenames(array('body' => $page_template));
page_footer();
}
So if you want to set var for a specific template you can use the old good code:
$template->set_filenames(array('body' => $page_template));
Where 'body' is the handle of the var and $page_template is the name of the template (example: 'your_template_body.tpl').
You may then need to force parsing by using the parse function (which is now run on page_footer() function to optimize code):
$template->pparse('body');
In practice it's still the old good phpBB code... nothing has changed in respect to what you were used to do in the past. You only have "smarter" functions now which allows you to have extra flexibility, as I have tried to specify here:
New Icy Phoenix 2.0 Functions: How To Use Them? Header, Footer, CFG
Let me know in case you need extra explanations.