Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/08/2010, 06:18
kadas99
 
Fecha de Ingreso: julio-2009
Ubicación: Argentina!
Mensajes: 324
Antigüedad: 14 años, 9 meses
Puntos: 4
Respuesta: includes en template.php

bueno lei un poco y encontre un trhead de abimaelrc muy bueno, pero entendi poco :S

Se muestra lo que quiero, pero no me hace caso al css incluido en el index.html

para que se entienda mejor:

Index.php
Código PHP:
Ver original
  1. <?php
  2. include_once("template.php");
  3. set_file("index","index.html");
  4. $menu = file_get_contents('http://localhost/inmo/inmo/templates/menu.html');
  5. set_var("menu",$menu);
  6. pparse("todo");
  7. ?>

Index.html
Código HTML:
Ver original
  1. <!-- BEGIN todo -->
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <link href="../css/css.css" rel="stylesheet" type="text/css">
  5. </head>
  6.  
  7. <div id="contenedor">
  8. <div id="header">
  9. cabecera<br>
  10. </div>
  11. {menu}
  12. </div>
  13. </body>
  14. </html>
  15. <!-- END todo -->

Menu.php
Código PHP:
Ver original
  1. <?php
  2. include_once("template.php");
  3. set_file("menu","menu.html");
  4. pparse("todo");
  5. ?>

Menu.Html
Código HTML:
Ver original
  1. <!-- BEGIN todo -->
  2. Menu1 | Menu2 | Menu3 | Menu4
  3. <!-- END todo -->


Css.css
Código CSS:
Ver original
  1. body {
  2.     background: url(../imagenes/header_bg.jpg) repeat-x;
  3.     text-align: center;
  4.     margin: 0;
  5.     padding: 0;
  6.     list-style: none;
  7. }
  8.  
  9. #contenedor {
  10.     text-align: left;
  11.     margin: auto;
  12.     width: 774px;
  13. }
  14.  
  15.  
  16. #header{
  17. text-align:left;
  18. padding-top:60px;
  19. color:#FFFFFF;
  20. font-size:25px;
  21. font-weight:bold;
  22. text-transform:capitalize;
  23. }

Última edición por kadas99; 20/08/2010 a las 06:29