Witam!
Mam oto taki system szablonów:
  1. <?php
  2. class Template {
  3. var $tmpl;
  4. var $dane;
  5.  
  6. function Template ($name)
  7. {
  8. $this->tmpl = file_get_contents($name);
  9. $this->dane = Array();
  10. }
  11.  
  12. function add($name, $value = '')
  13. {
  14. if (is_array($name)) {
  15. $this->dane = array_merge($this->dane, $name);
  16. } else if (!empty($value)) {
  17. $this->dane[$name] = $value;
  18. }
  19. }
  20.  
  21. function execute() {
  22. return preg_replace('/{([^}]+)}/e', '$this->dane["\\1"]',
  23. $this->tmpl);
  24. }
  25.  
  26. }
  27. ?>

  1. <?php
  2. include 'themes.php';
  3.  
  4. $tmpl = new Template('themes/index.html');
  5. $tmpl->add('title', 'dsadsadsadsa');
  6. $tmpl->add($dane);
  7. echo $tmpl->execute();
  8.  
  9. ?>


Problem polega na tym że nie czyta on CSS z szablonów. Nie ważne czy arkusz stylu jest w środku szablonu strony czy osobno, skrypt po prostu go nie czyta.
Jak temu zaradzić?