mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
added simple {capture} logic
This commit is contained in:
1
NEWS
1
NEWS
@@ -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)
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user