  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: template.php 324 2005-12-05 02:18:32Z hpdl $ |
| |
| 3 | + | $Id: template.php 325 2005-12-05 03:28:21Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
113 | 113 | | var $_javascript_blocks = array(); |
| |
114 | 114 | | |
| |
115 | 115 | | /** |
  |
116 | | - | * Hold the extra modules to load on the page |
| |
117 | | - | * |
| |
118 | | - | * @var array |
| |
119 | | - | * @access public |
| |
120 | | - | */ |
| |
121 | | - | |
| |
122 | | - | var $_extra_page_modules = array('before' => array(), 'after' => array()); |
| |
123 | | - | |
| |
124 | | - | /** |
|
125 | 116 | | * Setup the template class with the requested page module |
| |
126 | 117 | | * |
| |
127 | 118 | | * @param string $module The default page module to setup |
| |
|
|
 |
… |
|
396 | 387 | | } |
| |
397 | 388 | | |
| |
398 | 389 | | /** |
  |
399 | | - | * Adds an extra module to load on the page, either before or after the page content |
| |
400 | | - | * |
| |
401 | | - | * @param object $class The class instance to initialize the extra module |
| |
402 | | - | * @param string $location Load the extra module "before" or "after" the page content |
| |
403 | | - | * @access public |
| |
404 | | - | */ |
| |
405 | | - | |
| |
406 | | - | function addContentModule($class, $location = 'before') { |
| |
407 | | - | if (isset($GLOBALS[$class])) { |
| |
408 | | - | $GLOBALS[$class]->contentModuleInitialize(); |
| |
409 | | - | $this->_extra_page_modules[$location][] = $GLOBALS[$class]->getContentModule(); |
| |
410 | | - | } elseif (isset($_SESSION[$class])) { |
| |
411 | | - | $_SESSION[$class]->contentModuleInitialize(); |
| |
412 | | - | $this->_extra_page_modules[$location][] = $_SESSION[$class]->getContentModule(); |
| |
413 | | - | } |
| |
414 | | - | } |
| |
415 | | - | |
| |
416 | | - | /** |
  |
417 | 390 | | * Returns the javascript filenames to link to on the page |
| |
418 | 391 | | * |
| |
419 | 392 | | * @access private |