From 78a10d8aaf2d825931660371ad2e8b8ad0cb93ad Mon Sep 17 00:00:00 2001 From: mohrt Date: Mon, 30 Apr 2001 16:40:05 +0000 Subject: [PATCH] added simple {capture} logic --- NEWS | 1 + Smarty_Compiler.class.php | 6 ++++++ libs/Smarty_Compiler.class.php | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/NEWS b/NEWS index 5b56fde3..c2c2a7db 100644 --- a/NEWS +++ b/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) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index e8c897af..f208b97f 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -199,6 +199,12 @@ class Smarty_Compiler extends Smarty { case '/if': return ''; + case 'capture': + return ''; + + case '/capture': + return 'assign("return", ob_get_contents()); ob_end_clean(); ?>'; + case 'ldelim': return $this->left_delimiter; diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index e8c897af..f208b97f 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -199,6 +199,12 @@ class Smarty_Compiler extends Smarty { case '/if': return ''; + case 'capture': + return ''; + + case '/capture': + return 'assign("return", ob_get_contents()); ob_end_clean(); ?>'; + case 'ldelim': return $this->left_delimiter;