init
[garradin.git] / include / libs / template_lite / plugins / block.capture.php
1 <?php
2 /**
3 * template_lite {capture}{/capture} block plugin
4 *
5 * Type: block function
6 * Name: capture
7 * Purpose: removes content and stores it in a variable
8 */
9 function tpl_block_capture($params, $content, &$tpl)
10 {
11 extract($params);
12
13 if (isset($name))
14 {
15 $buffer = $name;
16 }
17 else
18 {
19 $buffer = "'default'";
20 }
21
22 $tpl->_templatelite_vars['capture'][$buffer] = $content;
23 if (isset($assign))
24 {
25 $tpl->assign($assign, $content);
26 }
27 return;
28 }
29 ?>