Tema: Web modular
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/07/2010, 18:13
fernandozunni
 
Fecha de Ingreso: febrero-2009
Mensajes: 218
Antigüedad: 15 años, 2 meses
Puntos: 9
Respuesta: Web modular

Creas otra plantilla en el mismo directorio que la por defecto y después la llamas igual que a la otra.
Código PHP:
Ver original
  1. define('MODULO_DEFECTO', 'home');
  2. define('LAYOUT_DEFECTO', 'layout_simple.php');
  3. define('OTRA_PLANTILLA', 'otra_plantilla.php');        //definis la otra plantilla
  4. define('MODULO_PATH', realpath('./modulos/'));
  5. define('LAYOUT_PATH', realpath('./layouts/'));
  6.  
  7. $conf['home'] = array(
  8.         'archivo' => 'home.php',
  9.         'layout' => LAYOUT_DEFECTO );
  10.  
  11. $conf['modulouno'] = array(
  12.         'archivo' => 'modulouno.php',
  13.         'layout' => OTRA_PLANTILLA );