tmp
Sets a scratchpad variable to the value specified
in the tag body.
The variable will not be saved into the user's session
and will therefore only be valid for the remainder of the current page.
This tag will interpolate
its body text by default.
Summary
- [tmp name] String to save [/tmp]
| Parameter
|
Description
|
Default
|
| name |
The name of the scratchpad variable you would like to set. |
None |
| interpolate |
Parse Interchange tags, included in the body text, before this container tag executes. |
Yes
|
Examples
Tag expansion example
|
[tmp foo] Hello world [/tmp]
|
The above sets up for the following example of a subsequent retrieval:
[scratch foo]
|
|
Hello World
|
Perl example
$Tag->tmp({
name => $name,
body => $value,
});
|
or similarly with positional parameters:
|
$Tag->tmp($name, $value);
|
Description
Sets a scratchpad variable to the value specified in the tag body.
This is just as the [seti] tag would do it,
except that the name is added to the list of scratchpad entries that are to be
deleted immediately after the current page has been processed and served.
This saves session write time in many cases.
This tag interpolates
automatically.
Interpolation can be turned off by either passing the interpolate=0
parameter, or by simply using the [tmpn] tag instead.
|
Note
The [tmp] tag is not appropriate for setting scratchpad-based
order/search profiles or
mv_click
/
mv_check
callback actions.
If you want to define these but not store them in the users' session
then use a profile instead.
See the [OrderProfile] and [SearchProfile]
local configuration directives.
|
The "set
scratchpad variable" tags are all very similar.
The following table will help you select the one that's correct for your
requirements:
| Tag name
|
Temporary
|
Interpolates
|
| set |
No
|
No
|
| seti |
No
|
Yes
|
| tmpn |
Yes
|
No
|
| tmp |
Yes
|
Yes
|
Parameters
name
The name of the scratchpad variable whose value you want to set.