Name

control-set — Retrieve component attributes

ATTRIBUTES

Attribute Pos. Req. Default Description
index Yes
interpolate     0 interpolate input?
reparse     1 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

BEHAVIOR

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

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

control-set is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/control_set.coretag
Lines: 36


# 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: control_set.coretag,v 1.4 2007-03-30 23:40:49 pajamian Exp $

UserTag control-set         Order        index
UserTag control-set         addAttr
UserTag control-set         hasEndTag
UserTag control-set         PosNumber    1
UserTag control-set         Version      $Revision: 1.4 $
UserTag control-set         Routine      <<EOR
# Batch sets a set of controls without affecting Scratch
# Increments the index afterwards unless index is defined
sub {
my ($index, $opt, $body) = @_;

my $inc;
unless($index) {
  $index = $::Scratch->{control_index} || 0;
  $inc = 1;
}

while($body =~ m{\[([-\w]+)\](.*)\[/\1\]}sg) {
  my $name = lc $1;
  my $val = $2;
  $name =~ s/-/_/g;
  $::Control->[$index]{$name} = $val;
}
$::Scratch->{control_index}++;
return;
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

control(7ic)

DocBook! Interchange!