[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/templates/template_default/common/ -> main_template_vars.php (source)

   1  <?php
   2  /**

   3   * Common Template main_template_vars handler

   4   *

   5   * Normally a page will automatically load its own template based on the page name.<br />

   6   * so that a page called some_page will load tpl_some_page_default.php from the template directory.<br />

   7   * <br />

   8   * However sometimes a page may need to choose the template it displays based on a set of criteria.<br />

   9   * Placing a file in the includes/modules/pages/some_page/ directory called main_template_vars.php<br />

  10   * allows you to override this page and choose the template that loads.<br />

  11   *

  12   * @package templateSystem

  13   * @copyright Copyright 2003-2005 Zen Cart Development Team

  14   * @copyright Portions Copyright 2003 osCommerce

  15   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

  16   * @version $Id: main_template_vars.php 2620 2005-12-20 00:52:57Z drbyte $

  17   */
  18  
  19    if (file_exists(DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars.php')) {
  20      $body_code = DIR_WS_MODULES . 'pages/' . $current_page_base . '/main_template_vars.php';
  21    } else {
  22      $body_code = $template->get_template_dir('tpl_' . preg_replace('/.php/', '',$_GET['main_page']) . '_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_' . $_GET['main_page'] . '_default.php';
  23    }
  24    
  25  ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics