Name

Member — override catalog variables for logged-in users

SYNOPSIS

NAME value ...

DESCRIPTION

The directive overrides values of catalog variables for logged-in users (usually members of the site).

The override functionality is available when the catalog variable is accessed using the [var] tag.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Overriding a variable

Put the following in catalog.cfg:

Variable GREETING Hello, Guest!

Member GREETING Hello, Member!

Put the following on an Interchange page:

[var GREETING]

The above will return Hello, Guest! or Hello, Member!, depending on whether the user is logged in or not.


NOTES

AVAILABILITY

Member is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 599

['Member',         'variable',        ''],

Source: lib/Vend/Config.pm
Line 5295 (context shows lines 5295-5317)

sub parse_variable {
my ($var, $value) = @_;
my ($c, $name, $param);

# Allow certain catalogs global subs
unless (defined $value and $value) { 
  $c = { 'save' => {} };
  return $c;
}

if(defined $C) {
  $c = $C->{$var};
}
else {
  no strict 'refs';
  $c = ${"Global::$var"};
}

($name, $param) = split /\s+/, $value, 2;
chomp $param;
$c->{$name} = $param;
return $c;
}

AUTHORS

Interchange Development Group

SEE ALSO

var(7ic), Variable(7ic)

DocBook! Interchange!