capture â Captures all the output within this block and saves it into {$.capture.default}
by default, or
{$.capture.name}
if you provide another name.
<?php
capture([string $name = 'default', [ string $assign = null, [ bool $cat = false ]]])
true
, the value is appended to the previous one (if any) instead of overwriting it. If the cat
parameter is true
, the content will be appended to the existing content.Example #1
{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..