Не работают шаблоны!!(Smarty и QuickTemplate)

  • Автор темы puritania
  • Дата начала

puritania

Guest
Не работают шаблоны!!(Smarty и QuickTemplate)

Подскажите пожалуйста что делать... Установил Smarty 2.6.9 Все работает только если из нет вложенных шалонов. Т.е. если внутри шаблона например
PHP:
{ 
'index.tpl' :
{ include file = 'header.tpl' } 
<h1>test</H1>  
{ include file = 'footer.tpl' }

index.php:
...
$smarty->display('index.tpl');   
...
}
То результатом в браузере будет:
Код:
 { include file = 'header.tpl' }
 <h1>test</h1>
 { include file = 'footer.tpl' }

В QuickTemplate проблема таже.. только в чем? :confused:
PHP Version 4.3.11
Windows NT HOMEXP 5.1 build 2600
Apache 2.0.53
 

Demiurg

Guest
у тебя смарти сам добавляет пробелы, перобразует маленькие буквы к большим и удаляет теги ?
давай пользоваться copy/paste
 

puritania

Guest
Serguitar
Исправил
PHP:
index.tpl:
 { include file = "file:c:/internet/home/localhost/www/smarty/index/templates/header.tpl" }
 <h1>test</h1>
 { include file = "file:c:/internet/home/localhost/www/smarty/index/templates/footer.tpl" }

index.php:
<?
require ('c:/internet/home/localhost/lib/smarty/Smarty.class.php');
$smarty = new Smarty;
//$smarty->template_dir='file:c:/internet/home/localhost/www/smarty/index/templates/';
$smarty->compile_dir='c:/internet/home/localhost/www/smarty/index/templates_c/';
$smarty->cofig_dir='c:/internet/home/localhost/www/smarty/index/configs/';
$smarty->cache_dir='c:/internet/home/localhost/www/smarty/index/cache/';

$smarty->compile_check = true;

$smarty->display('file:c:/internet/home/localhost/www/smarty/index/templates/index.tpl');

?>
Результат:
Код:
 { include file = "file:c:/internet/home/localhost/www/smarty/index/templates/header.tpl" }
 <h1>test</h1>
 { include file = "file:c:/internet/home/localhost/www/smarty/index/templates/footer.tpl" }
=8-0
 

Demiurg

Guest
зачем пробелы после открытия скобок ?
зачем писать полные пути в display и include, пропиши template_dir.
 

puritania

Guest
Demiurg
спасиб замечания учел, но тем не менее.... что делать...:(
 

Demiurg

Guest
не работает только include ? другие функции нормально работают ?
 
Сверху