Name

value — expand to value of the UserDB variable specified in body

ATTRIBUTES

Attribute Pos. Req. Default Description

DESCRIPTION

The filter expands to the value of a UserDB variable. Name of the variable is specified in filter body.

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

Example: Filter example

[value name=online_value_test set="TEST VALUE" hide=1]

My test value is [filter value]online_value_test[/filter]

          

NOTES

In Interchange version 4.6.0, this symbol changed type from Filter to System Tag.

AVAILABILITY

value is available in Interchange versions:

4.6.0, 4.6.0, 4.8.0, 5.0.0, 5.2.0, 5.4.0, 5.6.0, 5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/value.coretag
Lines: 15


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: value.coretag,v 1.7 2008-07-04 15:52:35 mheins Exp $

UserTag value               Order        name
UserTag value               addAttr
UserTag value               PosNumber    1
UserTag value               Version      $Revision: 1.7 $
UserTag value               MapRoutine   Vend::Interpolate::tag_value
UserTag evalue              Alias        value keep=1 filter="encode_entities" name=

Source: lib/Vend/Interpolate.pm
Lines: 2566

sub tag_value {
  my($var,$opt) = @_;
#::logDebug("called value args=" . uneval(\@_));
local($^W) = 0;

my $vspace = $opt->{values_space};
my $vref;
if (defined $vspace) {
  if ($vspace eq '') {
    $vref = $Vend::Session->{values};
  }
  else {
    $vref = $Vend::Session->{values_repository}{$vspace} ||= {};
  }
}
else {
  $vref = $::Values;
}

$vref->{$var} = $opt->{set} if defined $opt->{set};

my $value = defined $vref->{$var} ? $vref->{$var} : '';
$value =~ s/\[/[/g unless $opt->{enable_itl};
if($opt->{filter}) {
  $value = filter_value($opt->{filter}, $value, $var);
  $vref->{$var} = $value unless $opt->{keep};
}
$::Scratch->{$var} = $value if $opt->{scratch};
return '' if $opt->{hide};
  return $opt->{default} if ! $value and defined $opt->{default};
$value =~ s/</&lt;/g unless $opt->{enable_html};
  return $value;
}

Source: lib/Vend/Interpolate.pm
Lines: 2566

sub tag_value {
  my($var,$opt) = @_;
#::logDebug("called value args=" . uneval(\@_));
local($^W) = 0;

my $vspace = $opt->{values_space};
my $vref;
if (defined $vspace) {
  if ($vspace eq '') {
    $vref = $Vend::Session->{values};
  }
  else {
    $vref = $Vend::Session->{values_repository}{$vspace} ||= {};
  }
}
else {
  $vref = $::Values;
}

$vref->{$var} = $opt->{set} if defined $opt->{set};

my $value = defined $vref->{$var} ? $vref->{$var} : '';
$value =~ s/\[/&#91;/g unless $opt->{enable_itl};
if($opt->{filter}) {
  $value = filter_value($opt->{filter}, $value, $var);
  $vref->{$var} = $value unless $opt->{keep};
}
$::Scratch->{$var} = $value if $opt->{scratch};
return '' if $opt->{hide};
  return $opt->{default} if ! $value and defined $opt->{default};
$value =~ s/</&lt;/g unless $opt->{enable_html};
  return $value;
}

AUTHORS

Interchange Development Group

SEE ALSO

evalue(7ic), scratch(7ic), values-space(7ic), realvalue(7ic), text(7ic), textarea(7ic), Promiscuous(7ic), ValuesDefault(7ic)

DocBook! Interchange!