For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

lookup

This filter looks up a value in a database table based upon the supplied table and column names.  The [filter] tag's body text is used as the key to look up.  If the key cannot be found in the table then the original input value will be returned.

This filter takes two parameters, which are the table to use and the and column value to return for the specified key.  The two parameters are separated with a single dot (.).

Also see the [data] tag.

Example

[filter lookup.country.name]UK[/filter]

or

[tmpn country]UK[/tmpn]
[filter op="lookup.country.name" interpolate=1][scratch country][/filter]

Results in:

United Kingdom

Source code

sub {
    my ($val, $tag, $table, $column) = @_;
    return tag_data($table, $column, $val) || $val;
}

Category:  Filters
Last modified by: Gert van der Spoel
Modification date: Sunday 5 July 2009 at 2:59 PM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us