For more information... RTFM!

You are not logged in

Powered by Interchange version 5.7.0


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 not interpolate its body text by default.


  • [tmpn name] string to save [/tmpn]

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. No


Tag expansion example

[tmpn foo] Hello world [/tmpn]

The above sets up for the following example of a subsequent retrieval:

[scratch foo]
Hello World

The following example demonstrates that the tag does not interpolate its body text by default:

[value name="bar" set="Joe" hide=1]
[tmpn foo] Good Morning, [value bar]! [/tmpn]
[scratch foo]
Good Morning, [value bar]!

If the [tmp] tag had been used then the result would have been: 

Good morning, Joe!

Perl example

    name => $name,
    body => $value,

or similarly with positional parameters:

$Tag->tmpn($name, $value);


Sets a scratchpad variable to the value specified in the tag body.  This is just as the [set] 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 does not interpolate automatically.  Interpolation can be turned on by either passing the interpolate=1 parameter, or by simply using the [tmp] tag instead.



The [tmpn] 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



The name of the scratchpad variable whose value you want to set.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Wednesday 6 December 2006 at 4:04 PM (CST)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us