added simple {capture} logic

This commit is contained in:
mohrt
2001-04-30 16:40:05 +00:00
parent 918697d472
commit 78a10d8aaf
3 changed files with 13 additions and 0 deletions

1
NEWS
View File

@@ -1,5 +1,6 @@
Version 1.4.0
-------------
- fixed path recognition for windows (Monte)
- added "componentized templates" tip into documentation (Monte)
- added {php}{/php} tags for embedding php code into templates (Monte)
- changed default value of $show_info_header to false (Monte)

View File

@@ -199,6 +199,12 @@ class Smarty_Compiler extends Smarty {
case '/if':
return '<?php endif; ?>';
case 'capture':
return '<?php ob_start(); ?>';
case '/capture':
return '<?php $this->assign("return", ob_get_contents()); ob_end_clean(); ?>';
case 'ldelim':
return $this->left_delimiter;

View File

@@ -199,6 +199,12 @@ class Smarty_Compiler extends Smarty {
case '/if':
return '<?php endif; ?>';
case 'capture':
return '<?php ob_start(); ?>';
case '/capture':
return '<?php $this->assign("return", ob_get_contents()); ob_end_clean(); ?>';
case 'ldelim':
return $this->left_delimiter;