For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

gate

Performs a security screen by testing to make sure a corresponding scratchpad variable has been set true.

This filter returns the body text verbatim if the specified scratchpad variable exists, otherwise it returns an empty string.

Example

1. [filter gate.test]The gate is open[/filter]
2. [tmpn test]1[/tmpn]
3. [filter gate.test]The gate is open[/filter]

Results in:

1.
2.
3. The gate is open

Source code

sub {
    my ($val, $var) = @_;

    return '' unless $::Scratch->{$var};
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Friday 23 February 2007 at 11:46 AM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us