
01-14-2010, 09:15 PM
|
 |
|
|
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Lynne
Sorry, I missed this. You would just do something like this...
PHP Code:
<?php
.......
// pre-cache templates used by all actions $globaltemplates = array('TEST', 'TEST2', 'TEST3', );
........ // ####################################################################### // ######################## START MAIN SCRIPT ############################ // #######################################################################
$navbits = construct_navbits(array('' => 'Test Page')); $navbar = render_navbar_template($navbits);
// ###### When do == 'xxx' ##### if ($_REQUEST['do'] == 'xxx') { $pagetitle = 'My Page Title';
$templater = vB_Template::create('TEST'); $templater->register_page_templates(); $templater->register('navbar', $navbar); $templater->register('pagetitle', $pagetitle); print_output($templater->render()); }
// ###### When do == 'yyy' ##### if ($_REQUEST['do'] == 'yyy') { $pagetitle = 'My Page Title';
$templater = vB_Template::create('TEST2'); $templater->register_page_templates(); $templater->register('navbar', $navbar); $templater->register('pagetitle', $pagetitle); print_output($templater->render()); }
// ###### When do does not equal 'xxx' or 'yyy' #####
$pagetitle = 'My Page Title';
$templater = vB_Template::create('TEST3'); $templater->register_page_templates(); $templater->register('navbar', $navbar); $templater->register('pagetitle', $pagetitle); print_output($templater->render());
?>
There are all sorts of different ways to do it, but that is one simple way.
|
Thank you for your help
|