discount-space
Switch to a different discount namespace.
Summary
| Parameter
|
Description
|
Default
|
| name |
The discount namespace to switch to. |
main |
| clear |
Clear the specified discount namespace after switching. |
No
|
| current |
Return the name of the current discount namespace. |
No
|
Examples
Tag usage example
|
[discount-space name="foobar"]
|
Perl example
$Tag->discount_space({
name => $name,
});
|
or similarly with positional parameters:
|
$Tag->discount_space($name, $attribute_hash_reference);
|
Description
This tag allows you to switch switch between any number of discount namespaces,
making the named space current
until it is switched with either another call to this tag,
or via the DiscountSpaceVar facility.
|
Note
This tag will only allow you to switch between discount namespaces if the
facility has been enabled using the DiscountSpacesOn
local configuration directive.
|
Also see the DiscountSpaceVar directive and the
[discount] tag's
"discount_space" parameter.
|
Availability
This tag was introduced in version 5.4.0,
and is therefore not available for use with any earlier Interchange version.
|
Parameters
name
Switch to the specified discount namespace.
if the specified discount namespace does not exist then it will
be created and initialised.
The default discount namespace is called "main".
clear
When set true the specified discount namespace will be
emptied immediately after switching.
current
If this parameter is set true then the name of the current
discount namespace will be returned.
No namespace switch will occur in this mode,
and the name and clear parameters
will be ignored.