Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/07/2005, 14:24
Avatar de tyo100
tyo100
 
Fecha de Ingreso: febrero-2005
Ubicación: Monterrey, NL
Mensajes: 475
Antigüedad: 19 años, 2 meses
Puntos: 1
Mi no entender muy bien tu pregunta, pero aqui te deje otro ejemplo, si checas bien la documentacion encontraras buena informacion, este ejemplo podria simular una consulta.

Código PHP:
<?php
$self 
$PHP_SELF;
$seccion $_GET['seccion'];
$link '<a href="{SELF}?seccion={CATID}">{CATNOMBRE}</a><br>';
include (
'class.NokTemplate.php');
$html = new NokTemplate('./forosdelweb');
$html->cargar('tCuerpo','cuerpo.html');
$html->cargar('tContenido','contenido.html');
$html->cargar('tInforme','informe.html');
$html->asignar('TITULO','Prueba, esto podria simular una consulta');
$html->cargarVirtual('Link',"$link");
$datos = array('0' => 'Electronica','1' => 'Carros','2' => 'Animales');
$productos = array('Televisores' => '0','Reproductores de DVD' => '0','Home Theater' => '0','Ferrari' => '1','Lamborghini' => '1','Bentley' => '1','Perro' => '2','Gato' => '2','Jirafa' => '2');
foreach (
$datos as $catid => $catnombre){
    
$html->asignar('SELF',"$self");
    
$html->asignar('CATID',"$catid");
    
$html->asignar('CATNOMBRE',"$catnombre");    
    
$html->expandir('LINK''+Link');
}
foreach (
$productos as $producto => $id){
    if (
$seccion == $id){
        
$html->asignar('PRODUCTOS',"$producto<br>");
        
$html->expandir('INFORME''+tInforme');
    }
}
$html->expandir('CONTENIDO''tContenido');
$html->expandir('FINAL''tCuerpo''tInforme');
$html->imprimir('FINAL');
?>
contenido.html solo debe tener {LINK} informe.html {PRODUCTOS}
__________________
Desde la tierra de los nopales, las tortillas de maiz, y en cuya ciudad se encuenta el cerro de la silla.
NalgAss Web
SpiderMex - La Historia del Hombre Araña en MEXICO