capture

1.0 1.1 1.2 1.3

capture — Captures all the output within this block and saves it into {$.capture.default} by default, or {$.capture.name} if you provide another name.

Description

<?php
capture([string $name = 'default', [ string $assign = null, [ bool $cat = false ]]])

Examples

Example #1

index.tpl
{capture "foo"}
  Anything in here wont show, it will be saved for later use..
{/capture}
Captured: {$dwoo.capture.foo}

The above example will output:

Captured: Anything in here wont show, it will be saved for later use..