For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

yesno

If the body text is not empty then return "Yes", otherwise return "No".

A locale-specific translation of "Yes" or "No" will be returned if defined.

White space is considered to be non-empty, you you may want to pre-filter the body text with "strip" before calling this filter.

Example

[filter yesno]Kevin Walsh[/filter]

Results in:

Yes

Source code

sub {
    my $val = shift(@_) ? 'Yes' : 'No';

    return $val unless $Vend::Cfg->{Locale};
    return $val unless defined $Vend::Cfg->{Locale}{$val};
    return $Vend::Cfg->{Locale}{$val};
}

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